I am having problem keeping the Modal to stay open an updated after the
form submission. Searching on the web all I see is to set the backdrop
(css) to static. So, I changed the css on the link as: <a href="#"
onclick="$('#myModal').modal({'backdrop': 'static'});" class="btn
btn-primary">My Modal</a>
But the modal closes after the submission if I use the link. Same as button.
db.define_table("Education",
Field("Title", "string", label='Title',
requires=IS_NOT_EMPTY(),default=None),
Field("filename", "upload", default=None,
uploadfolder=os.path.join(request.folder, 'uploads')))
def index():
form = SQLFORM(db.Education).process()
return dict(form = form)
#index.html
{{extend 'layout.html'}}
<div class="container">
<h2>Modal Example</h2>
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-info btn-lg" data-toggle="modal"
data-target="#myModal">Open Modal</button>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close"
data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<p>
{{=form}}
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
--
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.