Hi There,
I am trying to bridge acajoom with chronoform. I have tried all the solution available here on this forum including the curl plugin as this seems the url problem.
I have the check list of newsletters in my form which is like this.
Now if more then one checkboxes selected I want to retain those values in array and I am passing that variable like this
But appaently user doesn't get signed up for any newsletter with the above code whereas if I use "hardcode" like this
user does get signed up.
Basically I want the dynamic values passing in to the acajoom sign up url.
Thanks
I am trying to bridge acajoom with chronoform. I have tried all the solution available here on this forum including the curl plugin as this seems the url problem.
I have the check list of newsletters in my form which is like this.
<input id="strRequestList[]" name="strRequestList[]" value="1" type="checkbox">
<input id="strRequestList[]" name="strRequestList[]" value="2" type="checkbox">
<input id="strRequestList[]" name="strRequestList[]" value="3" type="checkbox">
Now if more then one checkboxes selected I want to retain those values in array and I am passing that variable like this
index.php?option=com_acajoom&act=subscribe&name=$name&email=$email&listid=strRequestList[]
But appaently user doesn't get signed up for any newsletter with the above code whereas if I use "hardcode" like this
index.php?option=com_acajoom&act=subscribe&name=$name&email=$email&listid=1,2,3
user does get signed up.
Basically I want the dynamic values passing in to the acajoom sign up url.
Thanks
Hi dasinfomedia,
replace :
by
in the URL so it looks like:
I added the extra quotes which you need to use at this PHP line!
Cheers
MAx
replace :
strRequestList[]
by
implode(",", JRequest::getVar('strRequestList'))
in the URL so it looks like:
"index.php?option=com_acajoom&act=subscribe&name=$name&email=$email&listid=".implode(",", JRequest::getVar('strRequestList'));
I added the extra quotes which you need to use at this PHP line!
Cheers
MAx
Thanks for the reply,
Although its still not working. I think we can not use double quotes" as we are having the url in the FORM URL tab and not in the FORM CODE tab.
I do have email checkbox checked in general settings.
I have tried to include the following code in both on submit-before sending email and on submit -after sending email.
$list=implode(",", JRequest::getVar('strRequestList'));
I am using the above $list variable in the FORM URL like this
index.php?option=com_acajoom&act=subscribe&name=$name&email=$email&listid=$list
Can you please help us out quickly.
Although its still not working. I think we can not use double quotes" as we are having the url in the FORM URL tab and not in the FORM CODE tab.
I do have email checkbox checked in general settings.
I have tried to include the following code in both on submit-before sending email and on submit -after sending email.
$list=implode(",", JRequest::getVar('strRequestList'));
I am using the above $list variable in the FORM URL like this
index.php?option=com_acajoom&act=subscribe&name=$name&email=$email&listid=$list
Can you please help us out quickly.
Hi dasinfomedia,
any URLs with PHP code need to go in the onSubmit box! please follow the post made by adrien with username acajoom here, I think this is the code which needs to go in the onSubmit after email box:
Cheers
Max
any URLs with PHP code need to go in the onSubmit box! please follow the post made by adrien with username acajoom here, I think this is the code which needs to go in the onSubmit after email box:
<?php
$MyForm->setFormData('redirecturl', "index.php?option=com_acajoom&act=subscribe&name=$name&email=$email&listid=".implode(",", JRequest::getVar('strRequestList')););
?>
Cheers
Max
Max,
I really appreciate your help. Unfortunately I have tried on submit after email for few times but I had no luck with it. This is the code I am using as per your instruction and I am getting the blank page.
Thanks in advance
I really appreciate your help. Unfortunately I have tried on submit after email for few times but I had no luck with it. This is the code I am using as per your instruction and I am getting the blank page.
<?php
// Get the ChronoForms data
$MyForm =&CFChronoForm::getInstance();
// Get the base url
$uri_base =&JURI::base();
// Create a new url object
$uri =&JURI::getInstance( $uri_base );
// Set the parameters for the Acajoom subscription
$params = array(
'option' => 'com_acajoom',
'act' => 'subscribe',
'listid' => 1,//I am using this for testing only I would need checkbox values
'name' => JRequest::getVar('name'),
'email' => JRequest::getVar('email'),
'receive_html' => 1,
'redirectlink' => $MyForm->formparams->redirecturl
);
$query = $uri->buildQuery( $params );
$uri->setQuery( $query );
// Set the new ChronoForms ReDirect URL
$MyForm->setFormData( "index.php?option=com_acajoom&act=subscribe", $uri->toString() );
?>
Thanks in advance
Hi dasinfomedia,
Please backup and remove all your code and just use my snippet here:
http://www.chronoengine.com/forums/posting.php?mode=reply&f=2&t=14258#pr32690
then let me know what happens, your code has some bugs and longer than needed to test it and find if its working or not, it should simply work with the 1 line I posted, this has been confirmed working by one of the acajoom team members before!
Regards,
Max
Please backup and remove all your code and just use my snippet here:
http://www.chronoengine.com/forums/posting.php?mode=reply&f=2&t=14258#pr32690
then let me know what happens, your code has some bugs and longer than needed to test it and find if its working or not, it should simply work with the 1 line I posted, this has been confirmed working by one of the acajoom team members before!
Regards,
Max
Hi MAX,
We are using the snippet suggested by you and it still goes to the blank page. This is the page
http://69.89.27.250/~healthqo/index.php?option=com_chronocontact&chronoformname=test
Here is the code
Thanks
We are using the snippet suggested by you and it still goes to the blank page. This is the page
http://69.89.27.250/~healthqo/index.php?option=com_chronocontact&chronoformname=test
Here is the code
<?php
$email = JRequest::getVar('email', '', 'post');
$name = JRequest::getVar('name', '', 'post');
$MyForm->setFormData('redirecturl', "index.php?option=com_acajoom&act=subscribe&name=$name&email=$email&listid=".implode(",", JRequest::getVar('strRequestList')););
?>
Thanks
Ok, looks like there was a typo, I removed a semi colon, please set your code to be:
let me know!
Max
<?php
$email = JRequest::getVar('email', '', 'post');
$name = JRequest::getVar('name', '', 'post');
$MyForm->setFormData('redirecturl', "index.php?option=com_acajoom&act=subscribe&name=$name&email=$email&listid=".implode(",", JRequest::getVar('strRequestList')));
?>
let me know!
Max
Ok The code has been replaced.
Unfortunately it doesn;t solves the problem.
here is the url
http://69.89.27.250/~healthqo/index.php?option=com_chronocontact&chronoformname=test
Unfortunately it doesn;t solves the problem.
here is the url
http://69.89.27.250/~healthqo/index.php?option=com_chronocontact&chronoformname=test
Hi,
your Chronoforms version is outdated, which version do you have installed ? I think the code will not work if you have any version before RC4.11, I suggest getting RC5!
Regards,
Max
your Chronoforms version is outdated, which version do you have installed ? I think the code will not work if you have any version before RC4.11, I suggest getting RC5!
Regards,
Max
Thanks for all your support.
With the latest release candidate I have managed to solve my problem.
With the latest release candidate I have managed to solve my problem.
This topic is locked and no more replies can be posted.