Created
October 12, 2021 07:49
-
-
Save ash-f/1e57f53c8094350ef4c96f294f558c87 to your computer and use it in GitHub Desktop.
WP Fluent Forms Month & Year field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this converts Simple Text field to month & year field. change month_year to acctual field name. | |
function ff_month_year_field( $data, $form ){ | |
if( $data['attributes']['name'] === 'month_year' ){ | |
$data['attributes']['type'] = 'month'; | |
} | |
return $data; | |
} | |
add_filter( 'fluentform_rendering_field_data_input_text', 'ff_month_year_field', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment