Skip to content

Instantly share code, notes, and snippets.

@ash-f
Created October 12, 2021 07:49
Show Gist options
  • Save ash-f/1e57f53c8094350ef4c96f294f558c87 to your computer and use it in GitHub Desktop.
Save ash-f/1e57f53c8094350ef4c96f294f558c87 to your computer and use it in GitHub Desktop.
WP Fluent Forms Month & Year field
// 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