I use Bootstrap theme for D7 site. On a front page I have a simple form which can be filled by anonymous user. When user submits form he is forced to register to move forward. I saved $form_state['values'] into $_SESSION to use them later and added some attributes to Submit button

'#attributes' => array(
    'data-toggle'=> 'modal',
    'data-target'=> "#register-modal",

But form submission forces page reload and closes modal window. 'data-backdrop'=>"static" attribute doesn't work in this case. Is there any chance to submit form without page reload (i'm not an expert in AJAX) and keep modal opened?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.