Gravity Forms.
I try to manipulate the form fields before they are rendered with
add_filter("gform_pre_render", "my_function", 10, 5);
function my_function($form){
...
$form["fields"][0]["content"] = 'This is a html-block'
}
Like this, I can pass the html-block’s content assumed the html is the first field on the form.
How can I target a field by id
? Let’s say the above html-block-field has the field id 13
.
According to this page about the form fields object, it looks like you’d need to do something like this:
where
$my_id
is the id of the field you are targeting