PageBuilder Code
Default form widget
You can call insert the web-form in PageBuilder using simple widget code:
{{widget type="VladimirPopov\WebForms\Block\Widget\Form"
webform_id="1"
template="webforms/form/default.phtml"
after_submission_form="0"
scroll_to="0"
async_load="0”}}
webform_id - is actual ID of the form.
template - form template which can have following values:
- webforms/form/default.phtml - default template
- webforms/form/multistep.phtml - multi-step template
- webforms/form/sidebar.phtm - compact sidebar template very similar to default
after_submission_form - show form after submission and display success text in popup.
scroll_to - scroll to the top of the success message after form submission.
async_load - load form asynchronously to bypass any caching. This is recommended when you pre-fill fields with customer data.
Button with the form in popup
{{widget type="VladimirPopov\WebForms\Block\Widget\Button"
webform_id="1"
template="webforms/button/default.phtml"
form_template="webforms/form/default.phtml"
button_text="Show form"
async_load="0"}}
webform_id - is actual ID of the form.
template - form template which can have following values:
- webforms/button/default.phtml - default template
form_template - form template which can have following values:
- webforms/form/default.phtml - default template
- webforms/form/multistep.phtml - multi-step template
- webforms/form/sidebar.phtm - compact sidebar template very similar to default
after_submission_form - show form after submission and display success text in popup.
button_text - text on the button.
scroll_to - scroll to the top of the success message after form submission.
async_load - load form asynchronously to bypass any caching. This is recommended when you pre-fill fields with customer data.
Please note that template and form_template have different values. In case of the button the first one renders the button with popup script, the second one - form.