Hi, well what I do to change some attributes in the forms is modifiying the
form before to be returned/rendered:
You can access to the elements in the form like a list
Ex:
form = SQLFORM.factory(Field('hoho'),
Field('haha')
)
form[0][1][1]['_class'] = "nothing"
return dict(form=form)
This Will change the class of the last <td> tag from "w2p_fw" to "nothing"
For a massive replace maybe Javascript is the best way.
Cheers!
El mié., 22 de may. de 2019 04:12, Константин Комков <[email protected]>
escribió:
> Web2py automatically add event listeners and class="btn" for button. What
> if my form contain more then one button or I don't want use that class?
> Usually I have used input type="button" in that case, but now text in my
> button may contain 2 rows and I can't use input becouse it inline element.
> How can I delete all web2py event listeners for buttons?
> For class I do next:
> el = document.getElementById("bak");
> el.classList.remove("btn");
>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/e4a04290-d79f-4af0-9607-40dd9b120046%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/e4a04290-d79f-4af0-9607-40dd9b120046%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/CA%2Bs%2BuJtGP1Jb9pHsp6V7pzx-Yi3boVEyqyA8CYe_SBDCKgMj1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.