On Tuesday, July 1, 2014 6:46:29 AM UTC-7, Andrey K wrote:
>
> Dear web2py users,
> I have a straight forward need in trigger submit action of sqlform outside 
> of form div - by clicking other button and hide original submit button on 
> the form. 
> Can I do it and how?
>

I'm going to guess that this will require that the "outside" button be 
backed by javascript code that can fire the form submit.  I'm giving a 
quick answer, so I don't know if this means you need to modify the DOM on 
the fly, or just work down through it to find the appropriate child.

Sorry for such a vague answer.
 

> I have only found that I can hide submit button on the original w2p form 
> by using:
> def myform():
>  form = SQLFORM.factory(Field('your_name', requires=IS_NOT_EMPTY()),Field(
> 'your_image', 'upload'))
>
> return locals()
>
>
> myform.thml:
> <div>
> {{=form}}
> </div>
>
>
> <div><button type="submit" value="myValue" class="btn 
> btn-primary">Separate Submit</button></div>
> Thank you in advance.
> All suggestion are very welcome.
>
>

/dps
 

-- 
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