Both fields are allowed to be populated dynamically and have its parameter name.
This works:
add_filter( "gform_field_value_text_field", "populate_text_field" );
function populate_text_field( $value )
{
return "Dynamic populated";
}
But this doesn't:
add_filter( "gform_field_value_dropdown_field", "populate_dropdown_field" );
function populate_dropdown_field( $value )
{
$value = array(
array( 'text'=>'Foo 1', 'value'=>'foo1', 'isSelected'=>false, 'price'=>'' ),
array( 'text'=>'Foo 2', 'value'=>'foo2', 'isSelected'=>false, 'price'=>'' ),
array( 'text'=>'Foo 3', 'value'=>'foo3', 'isSelected'=>true , 'price'=>'' )
);
return $value;
}
I know I can use gform_pre_render, and that's how I'm solving this.
But _field_value is much more easy.
I really did a research here in the forum but couldn't find an answer..
Am I missing something?