をチェックこれがテーマでのfunctions.phpに追加することによって、私のために働くことになりました。
<?php
//NOTE: update the ' 1' to the ID of your form
add_filter('gform_pre_render_1', 'populate_checkbox');
add_filter('gform_pre_validation_1', 'populate_checkbox');
add_filter('gform_pre_submission_filter_1', 'populate_checkbox');
add_filter('gform_admin_pre_render_1', 'populate_checkbox');
function populate_checkbox($form) {
foreach($form['fields'] as &$field) {
//NOTE: replace 3 with your checkbox field id
$field_id = 6;
if ($field->id != $field_id) {
continue;
}
$input_id = 1;
foreach (explode(',', $_GET["addresses"]) as $name => $value) {
//skipping index that are multiples of 10 (multiples of 10 create problems as the input IDs)
if ($input_id % 10 == 0) {
$input_id++;
}
$choices[] = array('text' => $value, 'value' => $value);
$inputs[] = array('label' => $value, 'id' => "{$field_id}.{$input_id}");
$input_id++;
}
$field->choices = $choices;
$field->inputs = $inputs;
}
return $form;
}
?>