How to Create a Contact or Lead Capture Form

You can easily add a contact or lead capture form to any popup by embedding your service’s form code in the HTML Code field. If you’re not using an external service, or you just want a simple form that collects data directly, you can use our built-in form processing shortcode.

Just create your custom form using HTML, and add the shortcode [mypopup_form_options close-time=650] inside it.

This shortcode automatically adds the necessary hidden fields for handling the form submission via Ajax and will close the popup 650ms after a successful submission. You can design your form however you want (except for file uploads). For more examples, see the shortcode documentation page.

Example:

<form class="mypopup-modal__form">
  <label for="my_popup_name">Name:</label>
  <input type="text" id="my_popup_name" name="Name" placeholder="Your Name" required>
  
  <label for="my_popup_email">Email:</label>
  <input type="email" id="my_popup_email" name="Email" placeholder="Your Email" required>
  
  [mypopup_form_options close-time=650]
  
  <button type="submit" class="button">Subscribe</button>
</form>
Did the answer help you?
Related Questions