Hi there,
is there an easy option to trim() formit textfields or do I have to create a function for it.
Any help appreciated.
Thanks,
Stefan
Hi there,
is there an easy option to trim() formit textfields or do I have to create a function for it.
Any help appreciated.
Thanks,
Stefan
I don’t think there is anything built-in to trim the values.
Maybe you can use a custom hook to trim all the values
<?php
$formFields = $hook->getValues();
$formFields = array_map('trim', $formFields);
$hook->setValues($formFields);
return true;
or you could use a custom output modifier in the email template.
Thanks a lot.
Do you think a custom output modifier would also work with Newspublisher? I just recognized this are newspublisher fields …
A (custom) output modifier should work almost everywhere in MODx.