Hi Josh,
Did I miss something? I put my form in bbpress forum every page.I want to get current forum id to specific field,but it didn’t work.I get nothing from specific field after submitting form.If I replace
$field['config']['default'] = bbp_get_forum_id();//get dynamic value
with
$field['config']['default'] = "8256";
I can get the 8256 value from specific field ,but forum id is dynamic. Did I miss something?
If I echo it , it will display correct forum id value,but I get nothing from specific field after submitting form.
$field['config']['default'] = bbp_get_forum_id();//get dynamic value
echo $field['config']['default'];//it will display correct forum id value
This is my script
add_filter( 'caldera_forms_render_get_field_slug-parent','parent_value');
function parent_value($field){
$parent_value= bbp_get_forum_id();
$field['config']['default'] = bbp_get_forum_id();
return $field;
}