>>> f.get('content').attrs['class'] = 'some-class'
Does what you want, I think.On Dec 25, 2008 3:55 PM, "adelevie" <[email protected]> wrote: >From a previous discussion, I was taught how to change the default value in a form like so: f.get('content').value="some content" I can change the id of the input field, too: f.get('content').id="some id" But I run into an obvious problem when trying to modify the class: f.get('content').class="some class" <obvious><dumbed down>This wont work as class is a "special" word in python</dumbed down></obvious> Is there a way to accomplish this? If not, is working with the Input class (and its subclasses) from web.template the place to (noobishly) hack in a solution? Thanks, Alan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
