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",))
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>