Hi there,
I think I have a working methodology in place for my particular requirements but I just wanted to check whether I am potentially taking a very roundabout route to get there.
The requirements
I am building a 'product registration' form for a client. Customers must be able to arrive at the site and register one or more products purchased from the retailer.
The first page of the form is standard user detail collection (which I am using to create posts in a custom post type). The second page of the form is the actual registration of product.
A user can register between 1 and 5 products at a time, so the first field is a select box numbered 1 to 5. After that I have 5 'sections' each containing the same fields. The first section displays always, the following sections have all their elements set to conditionally show depending on the value of the first select field.
Each allows a customer to drill down through a series of select elements to find their product. The first field is automatically populated with terms from the product taxonomy. All other select elements I am setting to disabled via a jQuery call on (document).ready.
I that have a manually scripted jQuery function to do getJSON data when the customer changes the product taxonomy select. So if they select Range 1, the second select element dynamically populates with the Product Titles from that range (and is enabled). If they select a product title then the third select field dynamically populates with all product codes available for that product (handled via ACF repeating fields).
This way the customer must select one box after the other and the selection of a previous box automatically updates the options available thereafter.
The question!
Does this sound like a reasonable way to approach this? Or am I missing some very funky functionality within Gravity Forms that could make my life easier and require less manual coding of javascript. Essentially Gravity Forms, at this particular point, is just creating the placeholders for me. But I couldn't see any obvious other way to handle the very specific JSON lookup.
I'm going to have take some time over coding the javascript so I can just have a single function to look after each product registration but I think it's achievable.
Anyway, I hope that all makes sense. I'm new to Gravity Forms so am just learning my way round its capabilities.
Cheers,
Alex