ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Text Field does not trim white space at the beggning or the end

omidhz 14 Jun, 2017
I think Text fields in CF should have the php trim function by default. Right now, users can enter blank space at the beginning and end of their input.
How/where can I add this php code to my Text field?
GreyHead 14 Jun, 2017
Answer
1 Likes
Hi omidhz ,

You can clean up the data after the form is submitted using code like this in a Custom Code action:
<?php
$this->data['text1'] = trim($this->data['text1']);
?>
Bob
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com