Cronoforms 2.5
I have a field that takes a dollar amount.
It is stored in the 'saved data' table correctly.
However it does not come out correctly in the email template.
ie,
$50000 comes out as 000
$50,000 comes out as ,000
$50000.00 comes out as ,000.00
Can anyone tell me where in the code to look to fix this?
I have a field that takes a dollar amount.
It is stored in the 'saved data' table correctly.
However it does not come out correctly in the email template.
ie,
$50000 comes out as 000
$50,000 comes out as ,000
$50000.00 comes out as ,000.00
Can anyone tell me where in the code to look to fix this?
Hi wizdum,
you are using the template or the elements titles ? you should find both at chronocontact.php but I want to know more about the issue!
Max
you are using the template or the elements titles ? you should find both at chronocontact.php but I want to know more about the issue!
Max
Hi Max. I am using the email template.
outputting the field in html eg <td>{ReqBaseSalary}</td>
I checked the html source and the dollarsign and first two digits are missing if a dollarsign is included.
outputting the field in html eg <td>{ReqBaseSalary}</td>
I checked the html source and the dollarsign and first two digits are missing if a dollarsign is included.
I see now where its processed but have no idea what the problem is :?
if i echo $post when $name == ReqBaseSalary it is correct. However if i echo $html_message after it is subsituted, it is missing the characters.
foreach ( $fields as $name => $post) {
$html_message = preg_replace("/\\{".$name."\\}/", $post, $html_message);
}
if i echo $post when $name == ReqBaseSalary it is correct. However if i echo $html_message after it is subsituted, it is missing the characters.
ok, try to add the field value as \$50000, backslash before it, what happens ?
Yeah that works.
it seems $n in preg_replace() outputs subpatterns of the regex
I changed it to str_replace and its all good🙂
it seems $n in preg_replace() outputs subpatterns of the regex
I changed it to str_replace and its all good🙂
$html_message = str_replace('{'.$name.'}', $post, $html_message);
great, thanks for letting me know this!😉
Wizdum,
could you please expand on how you fixed this or post the source code for chronoform.php?
I tried changing "preg" to "str" and it broke it.
Thanks, I'm very new at this..
could you please expand on how you fixed this or post the source code for chronoform.php?
I tried changing "preg" to "str" and it broke it.
Thanks, I'm very new at this..
Hi, try mine:
[attachment=0]chronocontact.zip[/attachment]
Cheers
Max
[attachment=0]chronocontact.zip[/attachment]
Cheers
Max
This topic is locked and no more replies can be posted.