Changing the Cache Time on Your Form Token

/** * Extend cache time on form tokens before today. * * @link https://wpforms.com/developers/how-to-change-the-cache-time-on-your-form-token */ function example_add_longer_token_time_before( $times ) { // Allow the token to persist for 3, 4, and 5 days $times[] = 3 * DAY_IN_SECONDS; $times[] = 4…Continue reading

Adding Transitions to Checkbox and Multiple Choice Selections

ul#wpforms-999-field_3 li label, ul#wpforms-999-field_27 li label { padding: 10px; transition: all ease 0.3s; background: linear-gradient(to right, #e27730 50%, #cd631d 50%); background-size: 200% 100%; background-position: left bottom; color: white; } ul#wpforms-999-field_3 li.wpforms-selected label, ul#wpforms-999-field_3 li label:hover, ul#wpforms-999-field_27 li.wpforms-selected label, ul#wpforms-999-field_27 li…Continue reading

How to Add Address Field Validation For Authorize.net

/** * Add address validation for Authorize.net address fields * * @link https://wpforms.com/developers/how-to-add-address-field-validation-for-authorize-net/ */ function wpf_dev_authorize_address_validation( $fields, $entry, $form_data ) { // Optional, you can limit to specific forms. Below, we restrict output to // form #1000. if ( absint(…Continue reading

How to Disable reCAPTCHA for Automated Testing

/** * Disable for automated testing. * * @link https://wpforms.com/developers/how-to-disable-recaptcha-for-automated-testing/ */ // Disable reCAPTCHA assets and initialisation on the frontend. add_filter( ‘wpforms_frontend_recaptcha_disable’, ‘__return_true’ ); // Disable validation and verification on the backend. add_filter( ‘wpforms_process_bypass_captcha’, ‘__return_true’ );Continue reading

How to Customize the Rich Text Field TinyMCE Icons

/** * Customize Rich Text Field TinyMCE buttons for top toolbar. * * @link https://wpforms.com/developers/how-to-customize-the-rich-text-field-tinymce-icons/ */ // Function to change the top toolbar function wpf_dev_customize_tinymce_buttons_toolbar1( $toolbar, $field_id, $field_data ) { $toolbar = [ ‘fontselect’, ‘fontsizeselect’, ‘forecolor’, ‘indent’, ‘outdent’, ‘italic’, ‘styleselect’,…Continue reading