I want to create a form which will allow people to submit recipes and have them show up as draft posts in Wordpress with all of the fields listed in the correct places in the post content. In general this is easy to do by setting up the fields in the form, then using them in a Content Template.
However, the HTML required to generate properly formatted recipes is quite complex (to get it working with Google Recipe View, for example) and requires me to do quite a bit of processing on the fields. For example, I want someone to fill in an 'Ingredients' textarea, but the output will require me to split that up by lines, and then insert them all as proper
li tags with the right attributes and so on.
I understand that the gform_post_data hook will let me adjust the post data before the post is created, but I can't find good documentation at all about how to actually look up the values of form variables to process them. http://www.gravityhelp.com/documentation/page/Gform_post_data shows some fields being grabbed with the rgpost function - but I can't really find documentation on how to use that, whether it works with all of the various types of field, etc. In fact looking at the php suggests it is pulling the raw data directly from $_POST, which probably doesn't have all of the correct formatting done on it.
The GFCommon::replace_variables function (which is the sort of thing I'd need to replicate) has much more complex code - using RGFormsModel::get_field, RGFormsModel::get_lead_field_value, and lots of other things.
Is there any way to construct a content template with php having simple access to the fields, or is this not really doable?