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.
Use this filter to define the phone field format for all fields.
Usage
add_filter('frm_phone_pattern', 'phone_field_pattern');
Parameters
- $pattern (string)
- $field (object)
Examples
Set validation for all phone fields
Use this code snippet to set the validation for all phone fields to accept any input.
add_filter('frm_phone_pattern', 'phone_field_pattern');
function phone_field_pattern() {
$pattern = '^.*$';
return $pattern;
}