Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This filter allows modifying the list of fields in the dynamic selection of the Dynamic field.
Usage
add_filter('frm_pro_fields_in_dynamic_selection', 'my_custom_function', 10, 2);
Parameters
- $fields (array): The list of fields.
- $args (array): Includes form_id.
Examples
Hide a specific field in the dynamic selection
add_filter('frm_pro_fields_in_dynamic_selection', 'hide_specific_field_dynamic_selection', 10, 2);
function hide_specific_field_dynamic_selection( $fields, $args ) {
foreach ( $fields as $index => $field ) {
if ( 13 == $field->id ) { //Replace 13 with the ID of your field
unset( $fields[ $index ] );
}
}
return $fields;
}