Hahaha!
mysubmitbutton["_class"] = "*btn btn-primary*" ;)

Spot on! 
Thanks @rochacbruno 


On Sunday, September 2, 2012 11:45:25 AM UTC-7, rochacbruno wrote:
>
> Server side DOM.
>
> An example:
>
> mysubmitbutton = form.elements('input[type=submit]')[0]
> mysubmitbutton["_value"] = "GO"
> mysubmitbutton["_class"] = "btn btn-primary"
>
> Other example, if you want to change the class of all "input" objects.
>
> inputs = form.elements("input')
> for input in inputs:
>     input['_class'] = 'form-input'
>
>
>
> On Sun, Sep 2, 2012 at 3:01 PM, Dadepo Aderemi <[email protected]<javascript:>
> > wrote:
>
>> Dear All,
>> How would HTML attributes like id, class etc be added to a form generated 
>> using the SQLFORM? I know with FORM, you can easily use the attribute name 
>> prepended with an underscore "_" to set the properties. How can this be 
>> done with SQLFORM?
>>
>> Specifically I am looking at adding an HTML class attribute to SUBMIT 
>> button generated?
>>
>> Would appreciate the help.
>>
>> Kind Regards!
>>
>>  -- 
>>  
>>  
>>  
>>
>
>
>

-- 



Reply via email to