Forms in a modal
Use this page when you want to open a Clickmax form in a modal triggered by a button, a link or any other trigger in your HTML.
Full example
How it works
- the button uses
data-cx-open="contato-modal" - the widget uses
data-cx-widget-id="contato-modal" - when the visitor clicks the button, the modal opens
- submission behaves exactly like a normal form
Recommended structure
If you want a predictable implementation, always stick to this pattern:
- a trigger with
data-cx-open - a widget with
data-cx-form-widget - a
data-cx-widget-idmatching the trigger's value
Example with more visual context
When to use a modal
Use a modal when:
- you want to keep the main page uncluttered
- the form is secondary to the flow
- the submission should happen without taking the visitor to another screen too soon