PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Populate field with form description

  1. Hey -

    I need to pre-populate a hidden field in a form with the current forms description. I have multiple forms, so I don't want to have to add in ID's.

    I was hoping something as simple as this would work:

    add_filter('gform_field_value_param_name', 'custom_function');
    function custom_function($value){
    	$desc = $form['description'];
        return $desc;
    }

    But, it does not. Any thoughts on how to do this. I am going to be pulling entries to the front end of the site and listing what form they have submitted. so this information is necessary.

    Thanks.

    Posted 12 years ago on Thursday April 26, 2012 | Permalink
  2. kyle
    Member

    Can't you just add a hidden field to every form and manually populate it with the data?

    Another idea would be to just grab the information from the form on the page you're outputting to.

    Posted 12 years ago on Friday April 27, 2012 | Permalink
  3. I would rather do this dynamically with the hooks so my client doesn't have to manually update one extra field. They will be chaining the description only in the forms based on the event they are having.

    Hooking in would be a lot smoother for them to have one thing to do.

    Posted 12 years ago on Friday April 27, 2012 | Permalink