How Do I Use a Link or Button to Trigger My Lightbox Form?
By default, the Lightbox option in the Web Form Generator generates a form that automatically appears when the page it’s published to loads.
With some customization, you can trigger a button or link to load the form instead of having it load immediately. Try this demo.
How to Trigger a Lightbox with a Link or Button
-
Go to your account’s Web Form page.
- Create a new form or edit an existing one.
-
Set the “Form Type” to “Lightbox”, then save and publish the form.
-
Paste the following HTML in the head section of your page:
* This must be inserted above your form’s HTML -
Add the following link to your page. Or, create your own button or link and include the “onclick” attribute from this one:
- Publish your page. When you click on the link/button, your lightbox will appear.