• Resolved sebfrey

    (@sebfrey)


    Hi, I am playing with this, have set up a button to open a dialog box when the button is clicked:

    <button type = “button” onclick=”modal_dialog_open();”>Open Modal</button>

    Works OK, but I have several dialog boxes and it always seems to want to open the most recently created one. I have tried something like this:

    <button type = “button” onclick=”modal_dialog_open(‘Dialog-Box-1’);”>Open Modal</button>
    <button type = “button” onclick=”modal_dialog_open(‘Dialog-Box-2’);”>Open Modal</button>

    Thinking that if I put the dialog box name in the modal_dialog_open() call it would open that named dialog box, but it does not seem to be the case. Is there a way to do what I want?

    Thanks much, great plugin!

    https://www.ads-software.com/plugins/modal-dialog/

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

    (@jackdewey)

    A single page can only have one dialog. If you create multiple, then you need to assign specific dialogs to specific pages, by going in the page editor and selecting which dialog should appear with the drop-down selection list.

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Question answered.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Which dialog box to open with modal_dialog_open() ?’ is closed to new replies.