Forums

Manipulating Text obtained in first form stage

cesar 15 Feb, 2018
Hello!

Here I am again asking for help. Would be really appreciated.

The question is:

Is there a way to manipulate text data obtained in the "submit" stage?

I have a client who wants to have important information sent to him via the form, but the clients and business managers to get a "censored" version of certain fields.

Similar on shopping sites that censor the first number of credit cards and only show the last 4 digits. Is there a way to obtain this text field and then remove X number of characters or change them to arteristsks?
Max_admin 16 Feb, 2018
Answer
Hi Cesar,

You can customize the email template to whatever you want, and you can use the shortcodes to place any data, please check the shortcodes section in the FAQs, you can for example modify the text in a PHP action then use {var:php_action_name} in the email body to insert the updated content.

Example, if your form has a field named abc, you normally use {data:abc} in the email to get its value, but you can add a PHP action before the email:
return substr($this->data("abc"), -4, 4);//return the last 4 characters of the string
Then use {var:php_name} in the email body.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cesar 16 Feb, 2018
1 Likes
Admin: awesome man! you always deliver!

I have to name the php action as well? to be able to use the php_name ? do I need to declare it ?
Max_admin 17 Feb, 2018
Hi Cesar,

Yes, the php_name is the name of the PHP action!🙂

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.