Hi all,
I'm currently using the following function to pass a value to a hidden form field:
add_filter('gform_field_value_inquiry_list', 'populate_inquiry_list');
function populate_inquiry_list($value) {
if(function_exists('upb_list_bookmarks')) {
return upb_list_bookmarks();
}
}
What this essentially does is return a function for the value of the inquiry_list
parameter. If I set this as something as simple as:
return 'test';
it works just fine -- but since I am passing HTML data (which is what upb_list_bookmarks
does) it doesn't seem to be saving the data at all - it's in-fact stopping the form from submitting. I've tested the function itself and it does return the information I want (again, an HTML ul>li list with URLs) and have even tested it by adding that to a sample textarea
field, which works fine. It's this hidden field that I'm having trouble with. Do I need to somehow escape the HTML values for a hidden field? I'm ultimately looking for this form to be able to send the notification email to admins with that HTML list (which is generated per user). Any help would be greatly appreciated. Thanks!