Using a two-page multi-page Gravity Form with AJAX. I have an issue with one of my dropdown's clearing it's $_POST value on submit.
- A US States dropdown - loading dynamically via
'gforms_pre_render'hook and modifying the $form object by adding choices
.on()based on the value of the US States dropdown, no hooks or modifying the $form object.
When I hit "Next" on the first page of the form, here's what part of the
$_POST variable looks like:
array(size=20) 'input_1' => '3bed' 'input_2' => '12/12/2013' 'input_3' => '33331' 'input_4' => 'Kentucky' 'input_5' => 'Frankfort'
When I hit "Submit" on the second page of the form, here's what the $_POST variable looks like when my cities dropdown clears:
array(size=20) 'input_1' => '3bed' 'input_2' => '12/12/2013' 'input_3' => '33331' 'input_4' => 'Kentucky' 'input_5' => ''
Any ideas on why this is occuring? Or perhaps I can be doing it differently? I was thinking that I might need to modify the $form object with all the cities choices when I click "next on the first page, but I'm not sure how to access the $form object to make sure those cities get in there.