quotation marks = problems

NotReal 05 Dec, 2011
I have a simple ChronoForms 3 form that I had been using, and I could have sworn I could enter a line of text in one of the fields with quotation marks around some of the text, like this -> "example"

I noticed recently that this particular field was now truncating the text and I traced it back to the very first quotation mark - nothing would be saved after that.

I need these quotations marks - anybody have an idea what is going on???
GreyHead 05 Dec, 2011
Hi NotReal,

I'd expect that to be OK in a textarea, not so sure about a text input. Do you know at which point the text gets truncated? Is is saved Ok in the database and lost on re-call?

Bob
NotReal 05 Dec, 2011
Shows up fine on the confirmation page - even shows up in the email that gets sent out, but never makes it into the database (truncated at the first ")
GreyHead 05 Dec, 2011
Hi NotReal,

In the OnSubmit Before Email box please try adding:
<?php
$text = JRequest::getVar('input_name', '', 'post');
$db = & JFactory::getDBO();
$text = $db->getEscaped($text);
JRequest::setVar('input_name', $text);
?>
Replacing 'input_name' twice with the name of your input.

Bob
NotReal 08 Dec, 2011
Finally got a chance to try this today

I replaced the 'input_name' as you indicated with the field name -> text_14

Is that what you meant? In any case - it didn't work, any data after the first " isn't save in the database
GreyHead 17 Dec, 2011
Hi NotReal,

I just ran a test here with a simple form and it appears to be working OK (without the extra code).

Has your site got Magic Quotes On in the PHP settings?

Bob
This topic is locked and no more replies can be posted.