PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Can Gravity Forms replicate this custom functionality?

  1. Existing static html site: http://www.maidtoclean.com/
    Site is being rebuilt in WordPress.

    Note the form in the right sidebar... "Do we clean in your area?"
    While this is a simple form, it calls a zipcodes.pl file which lists dozens zipcodes and their conditional statements. First 20 lines of code is below -
    Can you replicate this kind of form and conditional result statements?

    sub checkzipcode
    {
    if (($zipcode eq '20007') ||
    ($zipcode eq '20008') ||
    ($zipcode eq '20015') ||
    ($zipcode eq '20016') ||
    ($zipcode eq '20812') ||
    ($zipcode eq '20816') ||
    ($zipcode eq '20057') ||
    ($zipcode eq '21818'))
    {print "Yes, we do clean in your area. We provide recurring service in your area on Mondays. All other cleaning service is requested according to your needs. We would be happy to handle your request for service.\n";}
    elsif
    (($zipcode eq '20001') ||
    ($zipcode eq '20004') ||
    ($zipcode eq '20005') ||
    ($zipcode eq '20009') ||
    ($zipcode eq '20036') ||
    ($zipcode eq '20037') ||
    ($zipcode eq '20737') ||
    {print "Yes, we do clean in your area. We provide recurring service in your area on Tuesdays. All other cleaning service is requested according to your needs. We would be happy to handle your request for service.\n";}
    else
    {print "We're sorry, but we do not clean in your area at this time.

    Please contact us to inquire if we can make special arrangements to clean for you.\n";}
    }

    Posted 12 years ago on Tuesday July 26, 2011 | Permalink
  2. Yes, you probably could do this with Gravity Forms but it isn't a built in feature. You'd have to write a customization using the gform_validation hook to validate the zipcode that is entered and return a message as the confirmation.

    But what you want to do sounds more like Store Locator functionality. There are specialized plugins specifically for Store Locator type functionality. For instance you could look at this one: http://simplemap-plugin.com/

    What Gravity Forms would be good for would be for actually contacting the store that they locate.

    Posted 12 years ago on Tuesday July 26, 2011 | Permalink