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 hook can be used to allow different date formats in your form.
Formidable Forms is the best WordPress Form Builder plugin. Get it for free!
Usage
add_filter('frm_allow_date_mismatch', 'frm_date_mismatch', 10, 2); function frm_date_mismatch($allow_mismatch, $args)
Parameters
- $allow_mismatch = false; (boolean)
- $args (array)
- $args['date'] - original date
- $args['formatted_date'] - date in the new format
Examples
Translate the date format
This example allows you to configure your date format to be specific to the translated language.
add_filter('frm_allow_date_mismatch', '__return_true');