Closed fluke closed 10 years ago
Your markup is invalid. Simplified, you have:
<div class="modal-body">
<form>
</div>
<div class="modal-footer">
<input type="submit" />
</div>
</form>
You should move the opening form tag to just below the opening tag for the modal-content div.
That commit (e69bead) should reference issue 332, not 322.
I've made forms to be submitted in modals provided by Bootstrap 3.0. However the forms only submit when I refresh the page and not when the pages get turbolinked. On turbolinking I can keep clicking the submit button and nothing happens. This only happens in production for some reason.
Removing turbolinks fixes the problem but I want the speed gains from it.
One issue I think it could be is that the modals are initially display:none; so it may be an issue that the forms are not loaded properly.
I'll test form submissions without the modals but it's a must for the application I'm making.
deals_controller.rb
I have the form located in the index action itself.
_form.html.erb
The script is just used to keep the modal open in case there are validation errors in the form.