Frage

I had a question as to the best way to hook some specific functionality into my Gravity Form.

I have a situation where I want to show a different set of dropdown options based on several different possible ranges of postcodes entered into a field.

One way I've tried to achieve this was with Conditional Statements, but the only problem I'm encountering there is that there are quite broad ranges for the postcodes that aren't super easy to work with, plus a few exceptions.

e.g. New South Wales post codes can be: 1000, 1999, 2000, 2599, 2619, 2898, 2921, 2999

I could code this as a PHP function to validate and return a state, is there a way to hook that into the functions.php file? Or is there a better way to handle this?

Thanks!

War es hilfreich?

Lösung

Alright, I managed to come up with a solution for this by using a hidden select field as my conditional and then using on page javascript to check for entries to the postcode field and update the hidden conditional field manually.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top