I've been trying to build an order form based around dynamic selection of a patients medications. I've got all the code working behind the scenes so far, however I can't seem to get it to populate the price field.
I'm using a multi-page form where the first page is dynamically populated with a patients medications from the database as checkboxes likes this:
Then on the second page it checks to see how many checkboxes have been ticked and then multiplies that by a preset prescription charge. The only way I've found of doing this is using the gform_post_paging hook as the basic gform_field_value hook outputs $_POST data multiple times for some reason. When I dump the information (seen in the order_prescription_cost function) it prints all the correct information as floats, however the gform_post_paging hook won't update the price field. Here's the code:
I can't understand it, I've found a thread on here (http://www.gravityhelp.com/forums/topic/dynamic-population-parameter-outputs-outside-the-form-but-not-in-form-fields#post-64752) that states the gform_post_paging hook can be used like gform_pre_render, but it's not responding at all.
Can someone please help!