Validation field with conditional logic

Hello,

I have successfully integrated a validation field which validates values from a txt file.

My next issue is that when a valid value is entered, I want to show extra fields.

For example, when a user goes to the form page - there will be 1 single field which will be “Validation Code”

When a correct value is entered and a user hits “submit”, it will show Name, Email. Phone, City, etc. But I want these fields to be on a single form and show up on the same page.

Thank you!

If you are using the gform_validation or gform_field_validation filter, you won’t be able to show the fields on the same page. You can use one of those fields and then show additional fields on the next page of a multipage form.

If want to do something on the same page, you will need to use JavaScript or jQuery and would not use the gform_validation or gform_field_validation filter.

Hi Chris,

Thank you so much for your reply!

Do you have an article you can point me to regarding any JavaScript or jQuery to accomplish showing the form on one page?

I can’t seem to find anything in the forum.

I don’t have an article for that unfortunately. Live validation is not something easily done with Gravity Forms. You would probably look for a generic jQuery tutorial on how to read a file and return a response. Something like this is a good starting point:

I’ll leave this open in case anyone wants to share a solution they’ve used.

© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.