Is it possible to insert a default value for a time field? I couldn't find any docs on this.
I tried an array:
add_filter('gform_pre_render_6', 'populate_each_product_reserve');
function populate_each_product_reserve ($form){
$choices2 = array(
array("text" => "HH", "value" => '6'),
array("text" => "HH", "value" => '00'),
);
$inputs2 = array(
array("label" => "HH", "id" => 4.1),
array("label" => "MM", "id" => 4.2),
);
foreach($form["fields"] as &$field){
if($field["id"] == 4){
$field["value"] = $choices2;
$field["inputs"] = $inputs2;
}
}
return $form;
}
I have tried some variations of the input and value labels for the array, but couldn't get it to go through. Any ideas?