I have embedded a form inside of a bootstrap modal. If the form is filled in correctly it redirects. If there are errors the modal closes and the main page goes back to how it first looked. Only when I click on the "Sign up Here" button does it reveal that there were errors and what the errors are. Any idea on how to keep the modal open if there are errors
Thanks view::::::: <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Sign up Here</button> <!-- Modal --> <div id="myModal" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" data-dismiss="modal">×</button> <h4 class="modal-title">Here is all the informaiton we will need from you.</h4> <h4 class="modal-title"> some more info about this modal </h4> </div> <div class="modal-body"> <p>{{=index}}</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> controller:::::: def index(): form=SQLFORM(userdb.person) if form.process(keepvalues=True).accepted: response.flash = "Thank you for filling out the form." redirect(URL('thank_you')) elif form.errors: response.flash = "form has errors" else: response.flash = "please fill out the form" return dict(index=form) -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.