Changing the Name Attribute of a Hidden Field

/** * Custom function to change the name attribute of hidden fields in any form. * * @link https://wpforms.com/developers/how-to-change-the-name-attribute-of-a-hidden-field/ */ function wpf_field_properties_hidden( $properties, $field, $form_data ) { // Optional, you can limit to specific forms. Below, we restrict output to…Continue reading

Customizing Checkbox and Radio Fields to Look Like Buttons (All Forms)

.wpforms-container input[type=radio], .wpforms-container input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;} .wpforms-container input[type=radio] + label, .wpforms-container input[type=checkbox] + label { padding: 5px 10px !important; background-color:…Continue reading

Customizing Checkbox and Radio Fields to Look Like Buttons (Specific Forms)

.wpforms-container form#wpforms-form-1000 input[type=radio], .wpforms-container form#wpforms-form-1000 input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .wpforms-container form#wpforms-form-1000 input[type=radio] + label, .wpforms-container form#wpforms-form-1000 input[type=checkbox] + label {…Continue reading

MemberPress: WP Forms Pro – Fix Custom Phone Number Field

function mepr_dequeue_wpforms_on_register_page() { global $post; $is_product_page = ( false !== ( $prd = \MeprProduct::is_product_page($post) ) ); $is_account_page = \MeprUser::is_account_page($post); if($is_product_page || $is_account_page) { wp_deregister_script( ‘wpforms-smart-phone-field’ ); wp_dequeue_script( ‘wpforms-smart-phone-field’ ); } } add_action( ‘wpforms_frontend_js’, ‘mepr_dequeue_wpforms_on_register_page’, 9999 );Continue reading

How to Change Google reCAPTCHA Language Settings

/** * Set a specific language Google reCAPTCHA. * * @link https://wpforms.com/developers/how-to-set-the-language-for-google-recaptcha/ */ function wpf_dev_recaptcha_language_wpml( $url ) { // Get my current language setting from WPML $my_current_lang = apply_filters( ‘wpml_current_language’, NULL ); // Set the language of my Google reCAPTCHA…Continue reading

How to Set the Language for Google reCAPTCHA

/** * Set the language for Google reCAPTCHA. * * @link https://wpforms.com/developers/how-to-set-the-language-for-google-recaptcha/ */ function wpf_dev_recaptcha_language( $url ) { // Set the language code to FR (French) return esc_url_raw( add_query_arg( array( ‘hl’ => ‘fr ‘), $url ) ); } add_filter( ‘wpforms_frontend_recaptcha_url’,…Continue reading