Hi,
I'm having a function generate a number of input fields to overwrite a "Single Line Text" input field, which has a CSS class "subsection":
add_filter( 'gform_field_input', 'gform_cart_subsection', 10, 5);
function gform_cart_subsection($input, $field, $value, $lead_id, $form_id){
if($field["cssClass"] == "subsection"){
$favs = // array including post ID's added to favorites, stored in a cookie ;
foreach ( array_keys ($favs) as $fav){
$input .= '<label for="fav' . $fav . '">' . get_the_title($fav) . '</label><input name="field_1_9" id="fav' . $fav . '" type="text" value="Add a note..."><br/>';
}
}
return $input;
}
The form shows up fine on the front-end, but after submission, the content of the input fields generated do not show up in the Entry on the back-end.
I've tried json encoding as recommended by this post:
http://www.gravityhelp.com/forums/topic/cant-submit-input-name-array-to-show-up-in-entry-list
to no avail. What do you have to do after creating a "custom input" in order to save the submission?
Thanks,
Sepehr