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.

Gform field value dynamically populate textarea for Body field

  1. I am trying to dynamically populate the Body field for post data. I have followed the instructions here: http://www.gravityhelp.com/documentation/page/Gform_field_value_$parameter_name - but there is no documentation as to what field you should use for the gform_field_value. Below is the codes I have tried, but nothing works. i have checked off Allow field to be populated dynamically and the name of my parameter is "casedescription". Any ideas?

    Is textarea correct?

    add_filter("gform_field_value_textarea", "populate_casedescription");
    function populate_casedescription($value){
    return "This is incredible software if this works";
    }

    OR I tried this:
    add_filter("gform_field_value_body", "populate_casedescription");
    function populate_casedescription($value){
    return "This is incredible software if this works";
    }

    Posted 12 years ago on Friday February 24, 2012 | Permalink
  2. You would want to do this:

    add_filter("gform_field_value_casedescription", "populate_casedescription");
    function populate_casedescription($value){
    return "This is incredible software if this works";
    }
    Posted 12 years ago on Saturday February 25, 2012 | Permalink
  3. Thanks very much. This worked great. I think you should update the instructions page for this to specifically state that the first argument in add_filter should be the parameter name of the field you want to pre-populate and the second the name of the function you are using. It's not clear form the examples on that page that this is what is needed (I was under the impression from that page that the first argument is the type of field).

    Posted 12 years ago on Sunday February 26, 2012 | Permalink