Hello.
I've spend about an hour looking for a solution to my need, but I didn't find the right way to do it.
This is what I'd like to do:
- There is a 4 pages form.
- In the first page, I've a dropdownlist the we'll call "studytrips".
-
This list is populated using
add_filter('gform_pre_render_1', 'populate_studytrip');
and retrieving all posts of a specific type (custom post types) and with other filtering logic. - Once an item is selected, a radio button list is shown.
Until here I haven't any issue.
Each of the "studytrips" post (step #2 above) contains a specific meta data (custom field), called "periods". This custom field can recur one or more times.
So I could have, for the post X, this meta data:
periods = August 12, 2011 - August 20, 2011
periods = August 20, 2011 - August 27, 2011
periods = August 27, 2011 - September 3, 2011
...
The radio button list, given the post_id (from the dropdownlist value "studytrips"), must retrieve this data.
This is the step I'm stuck on right now.
Actually, I've already created a call to add_filter('gform_pre_render_1', 'populate_period');
, but I don't know how to get the value from the dropdownlist, since the form isn't doing any post.
Maybe I could get the value, putting the radio buttons in a second page, but this would go against the usability and more important, the logic of this form (each step is a specific category of fields that needs to be filled).
Thanks.