Alert words not allowed input field

Hi, i have this snippet in a input field which allows you to transform all words from uppercase to lowercase. Is it possible to add to this a script with a list of prohibited words (to be inserted later) and an alert to the user indicating that he has entered a prohibited word when will he click the send button? Thank you

add_action( 'hivepress/v1/models/listing/update', 'custom_update_listing_title', 1000, 2);

function custom_update_listing_title($listing_id, $listing){
	remove_action( 'hivepress/v1/models/listing/update', 'custom_update_listing_title', 1000, 2);
	
	$listing->set_title(ucwords(strtolower($listing->get_title())))->save_title();
}

HI,

Sorry, there’s no simple code snippet for this, it would require a custom implementation. If customizations beyond the available features are required for your site, please consider hiring someone for custom work https://fvrr.co/32e7LvY

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.