Thanks.

On Monday, June 5, 2017 at 2:36:50 PM UTC+2, Anthony wrote:
>
> The element you are inserting must have the proper HTML structure 
> (including CSS classes) to fit into the form. Use the browser DOM inspector 
> to get an idea what the HTML should look like for a field in the form.
>
> Anthony
>
> On Monday, June 5, 2017 at 4:19:29 AM UTC-4, Karoly Kantor wrote:
>>
>> I am having trouble properly formatting my extra elements to match the 
>> rest of the form.
>>
>> This is a quote from the web2py book below. Can someone tell me what is 
>> exactly meant by "*The variable my_extra_element should be adapted to 
>> the formstyle*"?
>>
>> I am using bootsrap3_inline as formstyle, and all the parts of my extra 
>> element show up in the leftmost column.
>>
>> Adding extra form elements to SQLFORM
>>
>> Sometimes you may wish to add an extra element to your form after it has 
>> been created. For example, you may wish to add a checkbox which confirms 
>> the user agrees with the terms and conditions of your website:
>>
>> 1
>> 2
>> 3
>>
>> form = SQLFORM(db.yourtable)my_extra_element = TR(LABEL('I agree to the 
>> terms and conditions'),                       
>> INPUT(_name='agree',value=True,_type='checkbox'))form[0].insert(-1,my_extra_element)
>>
>> *The variable my_extra_element should be adapted to the formstyle.* In 
>> this example, the default formstyle='table3cols' has been assumed.
>>
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to