Support » Plugin: Google Forms » Form validation (valid email address)

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Mike Walsh

    (@mpwalsh8)

    I would need to see a link to your page to verify but typically when this happens it is due to a Javascript error from your theme or another plugin. When a Javascript error occurs all Javascript process stops. Because the validation is all done with jQuery (Javascript) a Javascript error prevents it from running. You may want to check your error console to see if you are seeing any errors.

    Thread Starter fannaticall

    (@debrawhite)

    Oops sorry! http://debra-white.com/client-pages/1815-2/

    Just to clarify about the plugin, I cannot find the jQuery plugin to instal. I followed the link to the site, but the zip file I downloaded wasn’t accepted by WP.

    I don’t have an error console, I’m afraid – wouldn’t know what to do with it!

    Many thanks!

    Plugin Author Mike Walsh

    (@mpwalsh8)

    You don’t have to install the jQuery plugin, WordPress Google Form loads it automatically when the plugin loads. I just took a look at your page and if I don’t fill in any of the boxes and simply click the “Next” button, the validation process behaves correctly and I get an error message next to all of the required fields indicating they need to be completed.

    All browsers have an error console, they are typically part of the Developer tools menu (e.g. Firefox: Tools->Web Developer->Error Console, Chome: From Customize and Control menu ->Tools->Developer Tools)

    Thread Starter fannaticall

    (@debrawhite)

    I see. Thank you. I am looking to have the email address field validated, so I can use the data later in my process. Google form validation is not getting through.

    Found the dev tools. Thank you again!

    Plugin Author Mike Walsh

    (@mpwalsh8)

    The way Google builds forms, there isn’t anything special about a text entry field (where you would capture an email). It isn’t any different than a field where you ask any arbitrary question. Since there isn’t anything special about it, there isn’t any special validation that can be applied to it in the “generic” one size fits all approach.

    What could be done if you wanted to was to build a simple “add-on” plugin that ran a jQuery validation script (which can absolutely check for valid email addresses) on a specific field. That small plugin would have to be unique to your form because Google assigns IDs for form elements in a numeric sequence as fields are added to the form.

    So what you want is possible but would require you to code a custom plugin that invokes jQuery Validate on a specific field on your form to validate it as an email address.

    I’ve toyed with the idea of allowing users to include custom validation rules as part of a form definition to account for such a use case but have been reluctant to do so because the chance of error is significant and would result in the form breaking.

    The plugin does allow you to request an email address from the user which will be validated using jQuery Validate however that field is not added to the spreadsheet but is added to the confirmation email when used.

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Yep – very easy to do.

    1. Enable Custom CSS on the Plugin Settings page.
    2. Add the following to the Custom CSS section:
      div.ss-form-entry > input { width: 400px; }
      div.ss-form-entry > textarea { width: 400px; }

    That should do it for you – change the 400px to whatever value you’d like the width to be. There are lots of CSS classes defined which allow you to really tweak the form to make it look the way you want it to.

    I had asked a question about the form box length. Would your reply in this thread answer the question I had?

    (actually, I think your response was intended for me because it worked.)

    Thanks!

    Thread Starter fannaticall

    (@debrawhite)

    Hi Mike

    Thanks for this explanation.

    Not sure I’m following 100%. I have a question on my form for email address which does get transferred to my G From and, in the Google form, I have set validation to check it’s a valid email address. Previously I told G Form to look for “@” sign. Neither of these validation rules transfers through when I use this plugin on the site.

    I do need a valid email address, however, as I want to transfer the data elsewhere and email them stuff later. So working validation should be there, ideally.

    The idea of a custom plugin is great but not practical in my case, I think, as I will need quite a few of them, so something unique to each form doesn’t look like the ideal solution.

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Ok, now I am confused! Where on the Google Form did you define validation for a field to be an email address? Did you use data validation on the spreadsheet which holds the results?

    When I create a form these are the choices I see:

    1. Text
    2. Paragraph Text
    3. Mutilple Choice
    4. Checkboxes
    5. Choose from a list
    6. Scale
    7. Grid
    8. Date
    9. Time

    The only validation option I am seeing is to indicate whether or not the field is required. What am I missing?

    Thread Starter fannaticall

    (@debrawhite)

    criteria is text but then in validation, I get options for contains, does not contain, equals, is a valid email (which should read “is a valid email address”??), is a valid URL.

    It’s highly likely I have misunderstood something along the way.

    Any help?

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Can you post a screen shot of where you see these validation options? Maybe Google is rolling out new features and they haven’t gotten to me yet.

    This is what I see when I create a text field:

    https://dl.dropboxusercontent.com/u/10343959/GForm_ScreenShot.png

    Thread Starter fannaticall

    (@debrawhite)

    Oddly, I was trying to… but stupid google docs won’t let me share o/s my GApps domain! Aargh!! (It’s a frequent topic in their user forum – some bug I think.)

    I can allow viewing upon sign in for a google account holder…?

    Plugin Author Mike Walsh

    (@mpwalsh8)

    I don’t have permission to view the document.

    We may want to take this discussion to email – use my WordPress profile username at Gmail dot com.

    Thread Starter fannaticall

    (@debrawhite)

    Fingers crossed!

    Plugin Author Mike Walsh

    (@mpwalsh8)

    I just created a form under one of my Google Apps for my domain and I still don’t see an option for email validation when creating a form. The form creation screen looks identical to what I see with my regular Google account except I have an option to limit its visibility to the domain.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Form validation (valid email address)’ is closed to new replies.