Trim values of fields
The below example codes will trim (remove any whitespace at the start and end of a value). This makes sure any spaces a user entered at the start or end are removed before processing.
Insert the below PHP code in your child theme functions.php file, or create a custom plugin. You may also use a plugin that allows you to insert code snippets to your site.
Trim all fields:
Trims only specific fields:
PreviousGlobal fields / elementsNextRe-sending E-mails after editing entries via Listings for WordPress
Last updated