• Resolved austenozzy

    (@austenozzy)


    Hi there

    Great plugin – just need one little bit of help!

    How do I deactivate the escape key from closing the modal? I have a terms acceptance form on a custom redirect after first login, and I don’t want the user to be able to close the modal and continue.

    Thanks!

    Austen

    https://wordpress.org/plugins/modal-dialog/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    It is not possible right now, but I can add an option to disable the esc key over the week-end. Stay tuned!

    Thread Starter austenozzy

    (@austenozzy)

    Thanks!

    Also – I have a hidden div that is called into a specific page via is_page. How can I get the modal to show that div?

    Thanks again!

    Austen

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Upgrade to version 3.0.2 to get a new option to ignore the escape key.

    As for your question about getting your hidden div to appear when loaded through the dialog, what I would suggest is to modify your got a little bit to look for either is_page to be true or for the presence of a GET variable:

    if ( isset( $_GET['showsection'] ) || is_page( 99 ) ) {
        ...
    }

    Then, when you put the URL for the page to load in the dialog, add ?showsection=1 at the end of the URL.

    Let me know if this works and mark the issue as resolved if it does. Cheers!

    Thread Starter austenozzy

    (@austenozzy)

    Hi Yannick

    Many thanks for this – the esc button option works perfectly.

    Don’t worry about the other thing (I should’ve opened a new thread anyway) – I’ve iframed the form in separately.

    You’re a star, this is really helpful. Thanks again.

    Austen

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Glad to hear this did the trick. Please drop a review on the plugin if you have a chance.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘deactivate esc key to close’ is closed to new replies.