When someone sent a form, with any white field.
The email template comes like:
Name: Jack
Email: [email]jack@kack.com[/email]
Age: {age}
How to convert all white fields at "space"?
for example:
Name: 'Jack'
Email: [email]'jack@kack.com[/email]'
Age: ' '
Thanks
The email template comes like:
Name: Jack
Email: [email]jack@kack.com[/email]
Age: {age}
How to convert all white fields at "space"?
for example:
Name: 'Jack'
Email: [email]'jack@kack.com[/email]'
Age: ' '
Thanks
up, please
Hi osnysantos,
In the OnSubmit Before Email box you need to set a value so that ChronoForms finds it when it does the search and replace in the template html.
Bob
In the OnSubmit Before Email box you need to set a value so that ChronoForms finds it when it does the search and replace in the template html.
<?php
$age = JRequest::getVar('age', '', 'post');
JRequest::setVar('age', $age);
?>
Bob
But i have more than 20 fields, What do I do?
Hi osnysantos,
Try this
Bob
Try this
<?php
$input_array = array('input_1', 'input_2', . . . ) ;
$posted = JRequest::get();
foreach ( $input_array as $v ) {
if ( !in_array($v, $posted) {
JRequest::setVar($v, '');
}
}
?>
it should be fine for text values, may need to be tweaked to work with arrays.Bob
This topic is locked and no more replies can be posted.