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.

prefill checkbox

  1. enrise
    Member

    hi,

    I'm trying to prefill a form.
    I found this: http://www.gravityhelp.com/documentation/page/Gform_field_value_$parameter_name

    But I cant get it to work with (more then one) checkbox. text input/areas are fine
    How does that work?

    I use this tweakes prefill the text inputs/areas:

    $value = 'prefill value';
    add_filter('gform_field_value_FIELDNAME, function($content) use ($value) {
        return $value;
    });

    assuming my prefil name for the checkboxes is 'branche' and some example values are: ictmul, indust, archit

    $values = array('archit', 'ictmul');
    add_filter('gform_field_value_branche, function($content) use ($values) {
        //what goes here?
        return $values;//?? some array() ??
    });
    Posted 12 years ago on Friday November 25, 2011 | Permalink