bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Form in modal submit?

Open jossi opened this issue 13 years ago • 1 comments

How to make the submit action work when a form is in a modal?

The behavior now is that upon clicking submit, nothing happens. If I add data-dismiss="modal" to the input tag, the modal is dismissed but the action is not loaded as specified in the form target (in this case a black page)

<div class="modal-body">   
<form class="form-horizontal" action="http://givko.us6.list-manage.com/subscribe/post?u=d9dc0cd31343bbe6e12f581d3&amp;id=c568fa72b1" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank" novalidate>
                             <fieldset>
                                 <div class="control-group">
                                     <input placeholder="first name" class="input-xlarge" type="text" id="mce-FNAME" name="FNAME">
                                 </div>
                                 <div class="control-group">
                                     <input placeholder="last name" class="input-xlarge" type="text" id="mce-LNAME" name="LNAME">
                                 </div>

                                 <div class="control-group">
                                     <input placeholder="email address" class="input-xlarge" type="text" id="mce-EMAIL" name="EMAIL">
                                 </div>
                                 <div id="mce-responses" class="clear">
                                    <div class="response" id="mce-error-response" style="display:none"></div>
                                    <div class="response" id="mce-success-response" style="display:none"></div>
                                 </div> 
                                 <div class="control-group">
                                    <input class="btn  btn-success" name="subscribe" type="submit" id="mc-embedded-subscribe" value="send your request" data-dismiss="modal">
                                 </div> 
                            </fieldset>
</form>
</div>

jossi avatar Feb 14 '13 17:02 jossi

Sorry, can't help you with that here. It's up to you to handle form submissions—we just provide the building blocks. Try asking on the mailing list.

mdo avatar Feb 14 '13 21:02 mdo