Support » Plugin: Google Forms » Google validations and display

  • Tyler

    (@tyleraldridge85)


    Hello, I am running version 0.72 of your plugin on WP 4.0 with Vantage theme. My test form can be found here: http://rxaidllc.com/4tier/enroll/

    I have opted to use Google Form’s built in Data Validation because I am familiar with using Regular Expressions. On my form, on the second page it asks for First and Last name and I have [\w]{2,100} as an RE. This checks if the character count is between 2 and 100.

    My problem: The error-message div shows up automatically without the user entering anything. As you can see it says “Your name is too short” right away. I want this message to display only when the validation has failed. Additionally, when the user fails validation a new message that says “Must match pattern” comes up.

    Is there a custom CSS I can use that will never show “Must match pattern” and only show the error message when validation fails?

    https://wordpress.org/plugins/wpgform/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Tyler

    (@tyleraldridge85)

    I just saw that your plugin has support for Regex, and I am working on getting that working. However, when validation fails it displays a default “Please check your input.” error.

    On my form I currently have First Name using your built in Jquery validation with regex support, and Last Name is using Google verification still so you can see the difference.

    Is there a working way to have regex validation + custom error messages to display in the proper way?

    Plugin Author Mike Walsh

    (@mpwalsh8)

    I added jQuery validation to the Google Forms plugin long before Google added any sort of validation to Google Forms so there are some things which don’t work well together. The first issue you posted about is one of them – you can certainly suppress the CSS for the error-messages but the challenge is when and how to show it when there is a real error. I don’t know if it can be done with jQuery or not.

    There is no way to have custom error messages with the jQuery validation built into the Google Forms plugin. Technically I believe it is possible however managing an unknown number of inputs in an unknown number of formats with custom error messages can and will get unwieldy pretty quickly so I just went with the standard error messages from the jQuery plugin.

    Tyler

    (@tyleraldridge85)

    Well damn… This has been driving me nuts all day. haha.

    Hopefully there will be a workaround to this in future versions.

    Can’t you just add a custom field and call it when the standard error message is called?

    Plugin Author Mike Walsh

    (@mpwalsh8)

    The problem is when you let people enter was is essentially free form text, the odds of them putting in something which results in a Javascript error is high. Very high.

    I already have a lot of questions about why Google Forms isn’t working and 99% of the time, the problem is due to a Javascript error due to a plugin or theme doing something it shouldn’t do.

    I am reluctant to make a change or add a feature which would likely result in a lot of support questions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google validations and display’ is closed to new replies.