Custom Code quotes issue - Wordpress version

rlab 04 Feb, 2014
Hi,

I have 4 different images that I want to go to the same form page, but depending on which image the user clicked, I will redirect to a different page when the user submits the form. So, I thought I would add a URL parameter to the link they click, for example:
/feedback&source="1".

Then in Chronoforms I need to get that URL parameter and put it into a hidden field. So, I added a Custom Code block to my On Load event with the following code:

<?php
$source = get_query_var('source');
$form->data['source'] = $source;
?>


I don't know if that is correct way to get the URL parameter and save it into the hidden field with the name source in Wordpress?

But the bug is, that everytime I Save or Apply the form, it adds \ before the quotes in the code above. So, if I do 2 saves the code becomes:

$source = get_query_var(\\'source\\');
$form->data[\\'source\\'] = $source;

if I save the form again, I get another \ added before the quotes.

Do you access the form data using $form->data['fieldname'] like you do in Joomla?

Some Wordpress demos would be great.

I really lik this new version, it is much better than V4, great work!

Thank you.
Max_admin 04 Feb, 2014
Hi rlab,

Do you have "magic quotes" enabled on your server ? if you do then please disable it!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rlab 04 Feb, 2014
Hi,

No, magic quotes are off on the server. A Joomla 3.2.1 site on the same server is showing this information:
Magic Quotes Off

You didn't answer this question: Do you access the form data using $form->data['fieldname'] like you do in Joomla?

Thanks
Max_admin 05 Feb, 2014
Yes, we access the data just like in Joomla.

Regarding the quotes, please make sure that ALL magic quotes options are off, there are 3 of them I think, please check them under the "php info" under "system info" in joomla or your server!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rlab 05 Feb, 2014
Hi Max,

Yes, I already checked all three and they are all set to off.

I use Chronoforms on the Joomla sites on this server without any issues.

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