/** * Change the No Results Found text in Modern Dropdown. * * @link https://wpforms.com/developers/how-to-change-the-no-results-found-text-in-the-modern-dropdown-field/ */ function wpf_dev_change_modern_dropdown_noresults_text( $config, $forms ) { // Change 1369 to an ID of your actual form. if ( array_key_exists( 1369, $forms ) ) {…Continue reading
/** * 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
/** * 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
/** * 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
/** * 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
/** * 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
/** * 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
add_filter(‘the_generator’, ‘__return_empty_string’);Continue reading
/** * Add a profile form using Post Submissions * * @link https://wpforms.com/developers/how-to-build-an-profile-form-using-post-submissions/ */ function wpf_post_submission_custom_content( $post_id, $fields, $form_data, $entry_id ) { // Only do this for form #1089. if ( absint( $form_data[ ‘id’ ] ) !== 1089 ) {…Continue reading
add_filter( ‘login_errors’, function ( $error ) { // Edit the line below to customize the message. return ‘Something is wrong!’; } );Continue reading