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.

Auto populate field with custom field

  1. Is there a way, by using the "Allow field to be populated dynamically", to have a form field automatically get populated by a custom field?

    For example In my post I have a custom field called "stock_num" so in my form I would like this to be automatically populated so that it is included when the form is submitted.

    I know I can set the Paramater Name of the field to "stock_num" and then use this function

    add_filter("gform_field_stock_num", "populate_stock");
    function populate_stock($value){
       return "";
    }

    But I am not sure how to pull in the custom field. Any direction would be great

    Posted 8 years ago on Monday February 6, 2012 | Permalink
  2. Hi trewknowledge,

    You're already most of the way there. Here's a snippet that will take you the rest of the way. :)

    http://pastie.org/3358564

    Posted 8 years ago on Saturday February 11, 2012 | Permalink