Hi, sorry if this has been covered, have spent few hours looking through the forums but don't seem to be any the wiser.
Am trying to get the form to insert a reference number from a custom field in the post into the form custom field.
Might be easier to explain if I show what I'm trying to do, on each post page have set up custom fields for, property reference, bedrooms, bathrooms etc...
http://www.baxterestates.net/?p=67
All I would like to do is have the property reference number load into a field in the form so that when the form is received they can see what the property is that the form relates to. Have got it working where it sends the page id/title but the client really wants the reference number in the email so it can all match up with their records.
The custom field name in the post is called ref
Does anyone know how I can do this, have tried:
add_filter("gform_field_value_ref", "populate_ref");
function populate_ref(){
$ref_value = "Test";
return $ref_value;
}
which does send the value 'Test' in the form, but when I tried using:
add_filter("gform_field_value_ref", "populate_ref");
function populate_ref(){
return ref("ref");
}
It seems to hide everything below the existing custom fields in the post.
If anyone can help me with this would be very appreciated!