Hello @pcgardner,
That’s a great question.
Before writing custom code to display a popup, can you please check if our triggers can handle your use case first?
https://docs.wppopupmaker.com/article/545-a-beginners-guide-to-popup-triggers
If you absolutely need to write custom code to launch a popup, have a look at this doc next.
https://docs.wppopupmaker.com/article/84-getting-started-with-custom-js
Here’s a basic template you can use for writing jQuery to call a popup via a PHP hook.
https://gist.github.com/marklchaves/34ee7dcf3734bc59a898557bc188f02b
For sending values on a form submit, we think you should use hidden form fields. Here’s an example of sending a hidden field via a Mailchimp form inside a Popup Maker popup.
https://gist.github.com/marklchaves/da0ab6412986d1085e52dacca83c6851
Please let us know if you have any questions.
Cheers!
Mark
Thanks very much for that helpful reply. I’ll read the links you’ve suggested and get back to you.
Hello @pcgardner – on behalf of Mark, you are welcome!😊
We hope everything goes well on your end. In case you have further questions or concerns, you can always reach us back.
Have a great day!