Description
The wpforms_form_pages_content_before
action fires before a form is displayed on the site’s frontend, and the form was created with the Form Pages addon.
Parameters
This action does not accept any parameters.
More Information
The wpforms_form_pages_content_before
only fires for forms created with the Form Pages addon. It executes early on in the output rendering process.
An alternate action to consider is wpforms_form_pages_content_after
, as it functions similarly.
Source
wpforms-form-pages/templates/single-form.php
Examples
In this example, we’re going to post a link to our full digital catalog prior to displaying the form.
/** * Output something before your Form Pages form(s) using the Fires before a form is displayed on the site’s frontend, only if the form exists, contains fields, and was created with the <strong>Form Pages</strong> addon. action. * * @link https://wpforms.com/developers/wpforms_form_pages_content_before/ */ function wpf_dev_form_pages_content_before( ) { // Run code or see example echo statement below. _e( 'If you would like to download our digital catalog, <a href="http://yourlinkurl.com/" target="_blank">click here</a>.', 'plugin-domain' ); } add_action( 'wpforms_form_pages_content_before', 'wpf_dev_form_pages_content_before');