Hello, I am guessing this has been addressed here somewhere and I am just can't find it. I am having trouble pre rendering the address field.
this is where I am at right now inside the function :
$street = get_post_meta($post->ID, 'street', true);
$city = get_post_meta($post->ID, 'city', true);
$state = get_post_meta($post->ID, 'state', true);
$zip = get_post_meta($post->ID, 'zip', true);
$inputs = array(
array("id" => 15.1, "defaultValue" => $street),
array("id" => 15.3, "defaultValue" => $city),
array("id" => 15.4, "defaultValue" => $state),
array("id" => 15.5, "defaultValue" => $zip),
);
foreach($form["fields"] as &$field){
if($field["id"] == 15){
$field["defaultValue"] = $inputs;
}
}
return $form;
}