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:
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:
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.
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.
Hi rlab,
Do you have "magic quotes" enabled on your server ? if you do then please disable it!
Regards,
Max
Do you have "magic quotes" enabled on your server ? if you do then please disable it!
Regards,
Max
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
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
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
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
This topic is locked and no more replies can be posted.