Dealer Inquiry form needs with some complex values

Okay I will try to explain exactly what we are trying to achieve in this new form we are building out.

The purpose of this form is to intake data from over 1400 field locations across various dealers and we want this form to be smart in nature. Below I will outline exactly what we are looking to do with each field and describe them as best as I can.

Field Sets and purposes.

  1. Dealer number - We want to add validation to ensure that the number a user enters is a dealer number we are aware of. For this field we will have a list of 1400 known locations e.g 12345 might be a dealer number. We want to manage validation on 1400 records but we are unsure where we have to add this. Is this a function that needs to be added in our functions.php file?
  • Needs to be able to check against 1400 numeric dealer numbers
  • If the user enters the wrong number error message should populate " Please enter a valid dealer number"
  1. Serial Number - Our serial numbers are formatted in such a way that the first 4 digits represent a month and year. For example 0417514782 might be a serial number where 04 represents April and 17 represents the year 2017. What we are looking to do with this field is if the serial number is anywhere between 0817 AND 0819 that we would like to display a message to the customer indicating they are still within their warranty period. If the serial number is anything prior to August 2017 then we would like to populate a checkbox that asks for consent to charge with a checkbox (y/n). I’m not immediately finding anything that represents such a feature out of the box so I would assume we have to write something custom or use some sort of addon. Serial numbers are 10 digits in length and do not have Alpha characters, only numeric.

Other than these two items I believe the rest of the form that we need to build is straight forward but looking for some advice on how to accommodate validation on the 1400 records as well as trying to determine based on the serial number of the product was purchased within the last two years.

Any help on this is greatly appreciated.

Greetings gamma,

I’m a GF customer, and PHP developer, hanging out here just trying to be helpful and actively seeking a few testers for a new WP/GF plugin I’m donating to the OpenSource community, currently in beta release.

I read over your nicely described requirements, and they seem quite routine to implement - albeit with a bit of backend PHP.

I do have a few questions:

  1. Are the users interacting with your proposed web interface “logged in,” specifically how is their access validated ?
  2. Do you have any APIs available to access your “list of 1400 known locations” and what are its available responses ?
  3. Do you have in-house PHP/WP dev human resources available to support you, or are you looking to contract that out ?

I believe my new “MFSFS” plugin could provide your application with a few useful support functions in the following ways:

  • Provides for entered data persistence (either user account saved or in the active session)
  • Ease of access to the saved data for use by GF fields and back-end PHP functions
  • Pre-populating fields with saved data to support GF’s conditional logic capabilities

In response to your questions:

For your case of the “Dealer number” requirement, we’d need to validate the input to either a backend DB lookup against your 1400 record list, or call an API. This can be performed after either a submit event or clicking “next” button in a GF multi-page form.

For response effects, the hook handing the validation can handle the error condition case.

For the “Serial Number” case, this is similar to the former, but you just need a simple rule validator in a PHP function to set into the user’s meta data, which then would be auto populated by MFSFS’s merge tag handler into the form’s field to properly handle the checkbox action you need using the GF conditional logic feature. Obviously you will need to account for the current date in your rule logic on the SN validation.

LMK if you have interest in reviewing my current docs and demos for MFSFS, either here or via DM.

Also, depending on your answers to my questions, this could affect the approach I sketched out above.

Cheers !

hi @JASCoder I would be interested into discussing more is there a way we can connect in real time? Slack, Skype e-mail? Let me know if there is a way for us to discuss more in real time as I think it might be easier.


Hola - I’ve sent you a DM - you should be seeing some alert about that in your avatar icon in upper right…