Disable the space key with the special CSS class

/** * Disable the space key with the special CSS class * Apply the class “wpf-disable-space” to the field to enable. * * @link https://wpforms.com/developers/how-to-disable-the-space-key-inside-a-form-field/ * */ function wpf_dev_disalbe_space() { ?>Continue reading

Adding a Video Before Your Form

/** * Output something before your form(s). * * @link https://wpforms.com/developers/how-to-add-a-video-before-your-form/ */ function wpf_dev_frontend_output_before( $form_data, $form ) { // Optional, you can limit to specific forms. Below, we restrict output to // form #999. if ( absint( $form_data[ ‘id’ ]…Continue reading

Processing Smart Tags in HTML Field

/** * Process Smart Tags inside HTML / Code Block form fields. * * @link https://wpforms.com/developers/how-to-process-smart-tags-in-html-fields/ */ function wpf_dev_html_process_smarttags( $properties, $field, $form_data ) { $properties[ ‘inputs’ ][ ‘primary’ ][ ‘code’ ] = apply_filters( ‘wpforms_process_smart_tags’, $properties[ ‘inputs’ ][ ‘primary’ ][ ‘code’…Continue reading

Custom Style Icons for Rating field

div.wpforms-container-full form#wpforms-form-1000 .wpforms-field-rating svg { fill: transparent !important; stroke: #448ccb !important; stroke-width: 20px !important; opacity: 1 !important; } div.wpforms-container-full form#wpforms-form-1000 .wpforms-field-rating-item svg:hover { fill: #448ccb !important; } div.wpforms-container-full form#wpforms-form-1000 .wpforms-field-rating-item.selected svg { fill: #448ccb !important; transform: none !important; } div.wpforms-container-full…Continue reading

Using Smart Tags in Your WordPress Rewrite Rules

/** * Using Smart Tags in WordPress rewrite rules * * @link https://wpforms.com/developers/how-to-use-smart-tags-in-your-wordpress-rewrite-rules/ */ // Register custom query var function register_query_var( $wp ) { parse_str( $wp->matched_query, $url ); if ( ! isset( $url[ ’email_address’ ] ) ) { return; }…Continue reading

Body on Scroll

;(function ($) { $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll >= 5) { $(“body”).addClass(“scroll-500”); $(“.tm-header”).removeClass(“uk-blend-difference”); } else { $(“body”).removeClass(“scroll-500”); $(“.tm-header”).addClass(“uk-blend-difference”); } }); })(jQuery);Continue reading

Focused Form Fields

form#wpforms-form-1000 input:focus, form#wpforms-form-1000 textarea:focus { box-shadow: 5px 5px 10px #ccc; } form#wpforms-form-1000 input, form#wpforms-form-1000 textarea { transition: box-shadow 0.3s ease-in-out; } form#wpforms-form-1000 button[type=submit]:hover { box-shadow: 5px 5px 10px #ccc; border: 1px solid #ccc; background-color: #eee; } form#wpforms-form-1000 button[type=submit] { border:…Continue reading

Change the Payment Delimiter Inside Email Notifications

/** * Change the payment delimiter in the email notification * * @link https://wpforms.com/developers/how-to-change-the-payment-delimiter-inside-email-notifications/ */ function wpf_dev_entry_email_data( $fields, $entry, $form_data ) { // Only run on my form with ID = 310 if ( absint( $form_data[ ‘id’ ] ) !==…Continue reading

Create Custom Address Scheme

/** * WPForms Add new address field scheme (Custom) * * @link https://wpforms.com/developers/create-additional-schemes-for-the-address-field/ */ function wpf_new_address_scheme( $schemes ) { $schemes[ ‘custom’ ] = array( ‘label’ => ‘Custom’, ‘address1_label’ => ‘Address Line 1’, ‘address2_label’ => ‘Address Line 2’, ‘city_label’ => ‘City’,…Continue reading