ChronoForm and AcyMailing
DescriptionIf you use ChronoForm on your website, you can integrate AcyMailing with ChronoForm so that when a user submits a form, this user is also subscribed to one or several AcyMailing Lists. This method requires the AcyMailing subscription via URL (available from AcyMailing Essential on).
Test the subscription via URLIntegrate AcyMailing and ChronoForm using CurlOnce you tested your subscription via URL, you want the fields name and e-mail to be automatically replaced by the information sent in the form. We recommend you to use the Curl method to do that but if your server does not support it, you can still use the redirect URL. Log on to the back-end and click on the menu Chrono Forms -> Forms Management. Select the form you want to integrate with AcyMailing and click on CURL.
Click on the tab CURL params and enter the Target URL : http://www.yourwebsite.com/index.php?option=com_acymailing Don't forget to replace www.yourwebsite.com by the url of your own website!
ctrl=sub (replace hiddenlists=1,4 by the lists ID you want your user to be subscribed to)
Save the CURL plugin.
You should now enable this CURL plugin for your form.
You can now test from the front-end. Curl method with ChronoForm v4With Chronoform 4, the subscription via curl will look like that:
Integrate AcyMailing and ChronoForm using the redirect URLOnce you tested your subscription via URL, you want the fields name and e-mail to be automatically replaced by the information sent in the form. You can use the CURL plugin OR the redirect URL, but don't use both solutions! Log on to the back-end and click on the menu Chrono Forms -> Forms Management. Edit the form you want to integrate with AcyMailing (click on its name). Click on the tab Form Code and add this code in the area On Submit code - after sending email :
In our example we kept the default field names but you might have to change item_1 and item_2 by your own field names (based on what you wrote in the Form Wizard). In the url, the parameter hiddenlists=1,4 should be modified by your own lists IDs.
Save the form. Test this form on your front-end and make sure the user is added and subscribed properly to AcyMailing. Then, you can add a redirect link to the AcyMailing subscription url so that the user will be redirected to your own thank you page. Example : $MyForm->formrow->redirecturl = JURI::base()."index.php?option=com_acymailing&ctrl=sub&task=optin&hiddenlists=1,4&user[email]=$email&user[name]=$name&redirect=http://www.google.fr";
If you want to reach an external website, you should write your complete url and don't use JURI:base(): Example : $MyForm->formrow->redirecturl = "http://www.myotherwebsite.com/index.php?option=com_acymailing&ctrl=sub&task=optin&hiddenlists=1,4&user[email]=$email&user[name]=$name&redirect=http://www.google.fr";
Last Updated on Tuesday, 06 December 2011 16:46
|










