Hello,

When you submit the form in the modal it submit the whole page?

I do have the same issue and found that for no particular reason the form
tag of the embeded modal form is trim somehow. If I use the same component
form (web2py LOAD) without modal, my form has the html form tag...

Richard

On Thu, Nov 8, 2012 at 10:52 AM, Teddy Nyambe <[email protected]>wrote:

> Hi,
>
> How do I auto close a JS Bootstrap modal window that has simple form
> and then update a grid on the calling main page??? I am using
> Bootstrap modal window.
>
> Model:
> db.define_table('department', Field('name'))
> db.define_table('office', Field('name'), Field('department',
> db.department))
>
> Controller:
> def add_department():
>    form=SQLFORM(db.department)
>    if ..:
>       ...
>    else:
>       ...
>    return dict(form=form)
>
> def add_office():
>    form = SQLFORM(db.office)
>    if ...:
>       ...
>    else:
>       ....
> add_department.load:
>    {{=form}}
> add_office.load:
>    {{=form}}
>
> What I want in the view is to be able to add a company using a
> bootstrap modal window after clicking on save close the modal window
> and update a grid with a new company added in the same window. Also I
> when i add office modal window, in the dropbox i want to see the just
> added company without refreshing the main winnow but using ajax.
>
> Any ideas pointer...thanx in advance...
>  enalapril + nifedipin + pediatric benlin
>
> Teddy L.
>
> /~
>
> --
>
>
>
>

-- 



Reply via email to