Web Form Updates

When updating forms it is very important to test the following. Some updates can include the following
  • Updating Recaptcha
  • Adding/Removing recipients
  • Changing Response Redirect
  • Updating Plugin for Form Generation
  • Adding/Removing Fields
  • Creating/Deleting Form

RECAPTCHA

After adding Gravity Forms, install the following addon:

Then navigate to under dev@ampv.com and add the new site and receive credentials: https://www.google.com/recaptcha/admin/

Add the following script to functions.php:

// Block specific words in Gravity Forms webforms (update for php 8.0+)

add_filter('gform_field_validation', function ($result, $value, $form, $field) {

    GFCommon::log_debug(__METHOD__ . '(): Running validation...');

    if (in_array($field->type, ['text', 'textarea', 'name'], true)) {

        $stop_words = [

            'viagra', 'porn', 'seo', 'rank', 'ranking', '.com',

            '.ru', '.net', 'http', 'https', 'www',

        ];

        if ($result['is_valid'] && is_string($value)) {

            $pattern = '/\b(' . implode('|', array_map('preg_quote', $stop_words)) . ')\b/i';

            if (preg_match($pattern, $value)) {

                $result['is_valid'] = false;

                $result['message'] = 'Sorry, you used a word that is not allowed. Please review your message and remove any spammy words.';

                GFCommon::log_debug(__METHOD__ . "(): Stop words detected in field id {$field->id}.");

            }

        }

        if ($field->type === 'name' && $result['is_valid'] && is_array($value)) {

            $name_inputs = [

                '3' => 'First Name', 

                '6' => 'Last Name',  

            ];

            foreach ($name_inputs as $key => $input_label) {

                $input_value = $value[$key] ?? '';

                if (!empty($input_value)) {

                    if (!preg_match('/^[a-zA-Z\s]+$/', $input_value)) {

                        $result['is_valid'] = false;

                        $result['message'] = "Please use only letters and spaces in {$input_label}. Special characters are not allowed.";

                        GFCommon::log_debug(__METHOD__ . "(): Invalid characters in {$input_label}: {$input_value}");

                        break;

                    }

                    if (strlen($input_value) > 30) {

                        $result['is_valid'] = false;

                        $result['message'] = "{$input_label} cannot exceed 30 characters.";

                        GFCommon::log_debug(__METHOD__ . "(): {$input_label} exceeds max length: {$input_value}");

                        break;

                    }

                }

            }

        }

    }

    return $result;

}, 10, 4);

NOTE: please add it to functions.php via FTP/SFTP only to avoid breaking the site. This version of the script should not cause issues, but sometimes due to newer WP versions or server restrictions, it may not save in the theme editor or save improperly:

Try breaking the form by adding some of the spam words and submitting.

Check the form for contract validation and customize css:

Here’s some sample css you can use to target these validation error styles (as of March 2025):

.gform_validation_errors {
	border-color: #CFD9B5!important;
}

.gform_submission_error {
	color: #CFD9B5!important;
}

.gform_submission_error span {
	color: #CFD9B5!important;
}

.gform_validation_error_link {
		color: #CFD9B5!important;
}

#validation_message_1_3 {
	color: #CFD9B5;
}

.gform_validation_errors ol {
	list-style: none!important;
}

.gform-theme--framework .gform_validation_errors .gform-icon {
	font-size: 50px!important;
	border: none!important;
}
If you have done any of the above always make sure to check the following
  • WhatConverts / Iconnode
    • We have logins for most of these accounts. Contact a supervisor if needed. Confirm a new form submission is pulling into this CRM system and has all appropriate fields
    • If needed you may need to go into the WhatConverts settings and redo the initial setup
    • If we don’t have access to the WhatConverts account contact the client ASAP
  • .Send over a test submission and have the client confirm they received it before closing out the task
    • Ensure any submission redirects work post work as well

WhatConverts Active Sites

All the sites are pulled from their appropriate accounts. Some do not have any tracking setup, but may be activated at a later later are listed as inactive.

Lisa DeVoe – https://leads.justyourfriends.com/login
lisa@justyourfriends.com
  • AF2 Films – Inactive
  • Anago Nashville – https://www.anagonashville.com/
  • ASC Heating and Cooling – https://allseasonsac-sa.com/
  • Back Nine Greens
  • Challenger Turf – Inactive
  • Digital Bloom Marketing
  • Direct Dryers
  • Eagles Golf Club
  • Easy Air & Heat
  • EnvyLawn
  • FreeTouch
  • Frog Air
  • Fun Golf Club
  • Global SErvices
  • JTB Custom
  • Just Your Friends Marketing
  • Karina Hair & Beauty
  • Kelleher International
  • KP Greens – Celebrity Greens Lake Osweg
  • LBL Mortgage
  • Orange Bag
  • Pizzarageous
  • Premier Greens – Celebrity Greens Dallas
  • Remedy Medical Supply
  • Southwest Greens Ohio
  • SYNLawn Alabama
  • SYNLawn Carolinas
  • SYNLawn Central CA
  • SYNLawn Chespeake Bay
  • SYNLawn Colorado
  • SYNLawn Georgia
  • SYNLawn JAcksonville
  • SYNLawn Kansas City
  • SYNLawn Los Vegas
  • SYNLawn Los Angeles
  • SYNLawn Northern New Jersey
  • SYNLawn Tampa
  • Tool Lodge
  • Tournament Greens
  • Turf Now
  • Turf Outlet
  • Vida Cleanse
  • Vivacare
  • Warehouse Applicance
  • Wicked Intentions
Kimberly Judd-Penniehttps://leads.rankitupmarketing.com/login
kimberly@rankitupmarketing.com
  • Cave Creek Fit Body Bootcamp
  • Celebrity Greens Las Vegas
  • Celebrity Greens North Dakota
  • Celebrity Greens Phoenix
  • Desert iNet
  • Greener Walls
  • Idaho Greens and Lawns
  • Land and Stone Construction
  • My Postal Mailbox
  • SYNLawn Austin
  • SYNLawn Central Texas
  • SYNLawn Dallas
  • SYNLawn Hamptons
  • SYNLawn Houston
  • SYNLawn Indiana
  • SYNLawn Mississippi
  • SYNLawn New York
  • SYNLawn Oklahoma
  • SYNLawn Sacramento
  • SYNLawn San Diego
  • SYNLawn Seattle
  • The Hills Salon & Spa
  • Ultravision