CalcBuilder Forum

Apex in textarea

Usuario moon_846 2012-12-21 13:33:47

Hi there and sorry to bother.
I'm working with CB and I find it very useful. My problem is that I'm italian and, in our language, the apex is very much used.

I have a textarea for my customers, and if they write in it a string without apex, there's no problem. Otherwise, they get a 500 html error.

I tried
str_replace("'", "-", $note);

but it doesn't work.

But, if I try

str_replace("a", "-", $note);

it works...

Any advice?

Moonsoft support 2012-12-23 19:08:15

Hello,
it seems the input value is not properly escaped when recovering the value, so that error is thrown even before reaching your code. Please download again the module (you don't need to reinstall the component, so you won't loose your data), and try again your calculator. When starting your code, the value should be returned containing the ' , as it was filled by user, so you can start replacing if you need to.

Regards

Usuario moon_846 2012-12-28 13:04:22

Thank you, it works! ;)

Edited by moon_846 - 28.12.2012 13:28

...
List Manager

Build different lists for your site

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!