The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
replacing commas with PHP
I added a filter to replace commas in text and paragraph fields. It works great for text fields but is not working for paragraphs. Does anyone know if I have the field type for paragraphs wrong?
add_filter('frm_validate_field_entry', 'remove_commas', 8, 3);
function remove_commas($errors, $posted_field, $posted_value){
if($posted_field->type == 'text' || $posted_field->type == 'paragraph'){
$_POST['item_meta'][$posted_field->id] = str_replace(",",";",$posted_value);
}
return $errors;
}
September 24, 2018 at 4:22 pm
Paragraph fields are called textarea
Discussion closed.