for deeper customization you can use form.custom, see:
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-forms
On Tuesday, February 12, 2019 at 12:15:51 AM UTC+3, Ben Duncan wrote:
>
> Ok, thanks Val. that kinda gives me something to work with.
> I had to modify the view to
>
> :{extend 'layout.html'}}
> <h2>Input form</h2>
> {{=login_news}}
> <h2>Submitted variables</h2>
> {{=BEAUTIFY(request.vars)}}
> To get it to work.
>
> I will play with some more ...
>
> Thanks again ...
>
>
>
> On Mon, Feb 11, 2019 at 2:22 PM Val K <[email protected] <javascript:>>
> wrote:
>
>> def login_news():
>> form = SQLFORM.factory(Field('user'), Field('password', 'password'))
>> if form.process().accepted:
>> ... # auth logic goes here
>> login_div = DIV(form, _style = 'display: inline-block; width:50%')
>> news_div = DIV('blah '*50, _style = 'display: inline-block;width:50%;
>> vertical-align:top;')
>> return dict(login_news = DIV(login_div, news_div))
>>
>>
>>
>> On Monday, February 11, 2019 at 9:36:03 PM UTC+3, Ben Duncan wrote:
>>>
>>> I originally had it using FORM and could do that in the VIEW side of
>>> things.
>>> Doing that I somehow lost the usage of in_form.process/accept for some
>>> reason.
>>>
>>> I was trying to see if i could do it with the SQLFORM(.factory) helpers
>>> to regain those, but it looks like without great difficulty ..
>>>
>>> Thanks ...
>>>
>>> *Ben Duncan*
>>> DBA / Chief Software Architect
>>> Mississippi State Supreme Court
>>> Electronic Filing Division
>>>
>>>
>>> On Mon, Feb 11, 2019 at 12:13 PM Ben Lawrence <[email protected]>
>>> wrote:
>>>
>>>> You can use the FORM helper to add DIV elements. Or even add empty DIV
>>>> elements which you can fill in later with JS
>>>> one example
>>>> form = FORM( DIV(DIV( INPUT(...), , _class="col-sm-2") ,
>>>> DIV("NEWS",_id="form-user", _class="col-sm-2" ))
>>>> .....
>>>> , INPUT(_type='submit', _class = "btn btn-primary")
>>>> , _method="post", _id="payment-form")
>>>>
>>>> not sure if thats helpful!
>>>>
>>>> On Monday, February 11, 2019 at 9:13:48 AM UTC-8, Ben Duncan wrote:
>>>>>
>>>>> Ok, any ideas of how I can split my form down the middle using sqlform
>>>>> ?
>>>>>
>>>>> I need the left 50% for login input and the right 50% for a NEWS
>>>>> coulumn:
>>>>>
>>>>> ie:
>>>>>
>>>>> MY HEADER TOP LINE STUFF HERE
>>>>>
>>>>> -------------------------------------------------------------+--------------------------------------------
>>>>> User ID
>>>>> | (a pic) NEWS
>>>>> [
>>>>> ] | Headline Next Line
>>>>> Password
>>>>> |----------------------------------------------
>>>>> [
>>>>> ] | Blah Blah Blah Blah .........
>>>>>
>>>>> |
>>>>> <SUBMIT BUTTON> |
>>>>>
>>>>> ----------------------------------------------------------------------------------------------------------------
>>>>>
>>>>> ANY help is appreciated
>>>>>
>>>>> Thanks ...
>>>>>
>>>>> *Ben Duncan*
>>>>> DBA / Chief Software Architect
>>>>> Mississippi State Supreme Court
>>>>> Electronic Filing Division
>>>>>
>>>> --
>>>> 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.
>>>>
>>> --
>> 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] <javascript:>.
>> 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].
For more options, visit https://groups.google.com/d/optout.