Forums

Bootstap Modal Question

petergoeswest 27 Nov, 2013
Hi everyone,
I have been experimenting trying to get a form to display using the following bootstrap modal code, my problem is this, the form displays fine (and looks nicer than the default joomla modal as well as being responsive) however after clicking submit the modal closes prematurely. Does anyone have any suggestions on how I might make the modal window stay open and show the Thank-you message or any error messages (captcha)etc before closing.

Here's the code

<!-- Button trigger modal -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        {chronoforms}Reservations{/chronoforms}
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


I really hope someone could help me head in the right direction and I'm pretty sure other chronoform users may be interested.
This topic is locked and no more replies can be posted.