Description
The wpforms_wp_footer_end
action that is triggered at the end of the page load only if a form created with WPForms is found on the page and when all other scripts are loaded.
Parameters
This action does not accept any parameters.
More Information
This action will run at the end of the page load, but specifically for the wpforms_wp_footer_end
action, it will only fire if there is a form created with WPForms found on that page and only when all other scripts are loaded.
This is especially useful if you have any custom JavaScript or custom CSS on the page but you don’t want that code to run if there isn’t a WPForms on the page.
Source
wpforms/src/Frontend/Frontend.php
Examples
This example is pulled from a snippet reference (link shown below) and it’s using Javascript and the wpforms_wp_footer_end
action to disable the scroll animation on multi-page forms.
/** * Change the captcha theme for the Google Checkbox v2 reCAPTCHA * * @link https://wpforms.com/developers/how-to-change-the-captcha-theme-on-google-checkbox-v2-recaptcha/ */ function wpf_dev_change_captcha_theme( ) { ?> <script type="text/javascript"> jQuery(function($){ $( '.g-recaptcha' ).attr( 'data-theme', 'dark' ); }); </script> <?php } add_action( 'wpforms_wp_footer_end', 'wpf_dev_change_captcha_theme', 30 );
Reference Articles
- How to Allow Date Range or Multiple Dates in Date Picker
- How to Conditionally Show the Submit Button
- How to Customize the Date Time Field Time Picker
- How to Limit Range Allowed in Numbers Field
- How to Disable a Form Field to Prevent User Input
- How to Change the Captcha Theme on Google Checkbox v2 reCAPTCHA
- How to Limit the Number of Characters for a Text Field
- How to Set a Minimum Number of Characters
- How to Stop the Enter Key From Submitting the Form
- How to Open Redirect in a New Window
- How to Limit the Years Inside Your Date Picker
- How to Restrict Special Characters From a Form Field
- How to Disable the Scrolling Effect on Field Validation
- How to Populate a Form Field from an Anchor Link
- How to Add Animation Effects to Page Break Transitions
- How to Capitalize Form Field Inputs
- How to Set a Minimum Number of Choices for a Checkbox
- How to Restrict Phone Field to Only Accept Numbers
- How To Change the Position of the Date Picker Popup
- How to Hide Empty Poll Results
- How to Set a Default Flag on Smart Phone Field with GDPR
- How to Restrict Countries Inside Smart Phone Form Fields
- How to Link Your Form Pages Form Logo
- How to Link Your Conversational Form Logo
- How To Open a New Link on Form Submission
- How to Add Autofocus on Your Form
- How to Display a Total Word Count Under Your Form Field
- How to Set a Default Date for Your Date Picker Form Field
- How to Disable Past Times On the Time Picker
- How to Pre-Populate Fields in the Same Form
- How to Disable the Space Key Inside a Form Field
- How to Add a Password Visibility Toggle Button
- How to Add a Color Picker to Your Form
- How to Move to the Next Page Automatically
- How to Make the Form Locker Password Non-Case Sensitive
- How To Prevent Copy and Paste Inside Your Form
- How to Create a Conditional Rating Form
- How to Use Conditional Logic With a Date Picker
- How to Restrict Address Autocomplete to a Specific Country
- How to Show or Hide a Layout FieldHow to Show or Hide a Layout Field
- How to Automatically Submit a Form with a Field Choice
- How to Change the Tab Order Inside the Layout Field
- How to Create Conditional Logic for Coupons
- How to Add a Placeholder to the Coupon Field
- How to Enable a Checkbox After Reading Disclaimer
- How to Customize the Number Slider
- How to Add Falling Autumn Leaves to Your Confirmation Message
- How to Customize Payment Form Labels
- How to Password Protect a Submit Button
- How to Add Falling Snow Animation to Your Confirmation Message
- How to Add Confetti Animation to Confirmation Message