Anyway, feel free to submit a pull request if this functionality is
important to you.
Put my time where my mouth is? Eheheh, I should have expected this. I guess
I'll try to find time to make it soon, as this issue annoys me, not sure if
it's important, but I don't want to have to remember
Quinta-feira, 20 de Março de 2014 16:14:17 UTC, Leonel Câmara escreveu:
{{form['_class'] = 'service-form'}}
{{form['_role'] = 'form''}}
{{=form.custom.begin}}
The generated html was:
form action=# enctype=multipart/form-data method=post
Is this the supposed behavior or am I doing
it's just about as easy to manually write the HTML in place of
form.custom.begin.
Why have form.custom.begin then? I thought the point was to abstract away
whatever SQLFORM needs in the form declaration. So either form.custom.begin
(and end) should be removed or this is a bug/serious
If you couldn't add a class to a div, it would only be a bug if the class was
defined to allow classes to be added. Otherwise, it's a limitation.
form.custom.begin is still useful even though it isn't easily manipulated, so I
don't think it should be removed. And there are at least a few
If you couldn't add a class to a div, it would only be a bug if the class was
defined to allow classes to be added. Otherwise, it's a limitation.
form.custom.begin is still useful even though it isn't easily manipulated, so I
don't think it should be removed. And there are at least a few
you can do it by using
FORM(_class='yourclass', _role='role')
Em quinta-feira, 20 de março de 2014 13h14min17s UTC-3, Leonel Câmara
escreveu:
{{form['_class'] = 'service-form'}}
{{form['_role'] = 'form''}}
{{=form.custom.begin}}
The generated html was:
form action=#
Yeah, I know I can do that. However, I actually think that, if this really
doesn't work, then it is a bug; as there is no way to add a class or other
attributes to the form HTML element in custom forms, which are supposed to
be custom.
--
Resources:
- http://web2py.com
-
It's not a bug, but it is a limitation. form.custom.begin is not an HTML
helper (can't be because it's just the opening tag of the form), so it
cannot be manipulated the same way you can manipulate other helper objects.
In any case, if you're building a custom form (and for some reason cannot
8 matches
Mail list logo