I am not sure I follow. If you mean access each checkbox choice inside a field, you don't need to do it. Just return the choice text as one of the items in the comma separated list and that specific checkbox will be checked.
If you are asking how to access each checkbox field, you do that by the parameter name. When you turn on the option in the form settings to "Allow field to be populated dynamically", you give it a parameter name. That name is used in the hook.
add_filter("gform_field_value_$parameter_name", "populate_checkbox");
In your example above, the parameter name was "checkbox", so we used "gform_field_value_checkbox" for the filter name:
add_filter("gform_field_value_checkbox", "populate_checkbox");
Posted 13 years ago on Tuesday July 12, 2011 |
Permalink