replacing commas with PHP


This Discussion is public


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;

Paragraph fields are called textarea

Reply to this Discussion