Forums

acajoom/chronoforms with a twist :-)

jdriller 09 Mar, 2010
I'm trying to marry acajoom with chronoforms and before you groan because it seems to be a dead horse I have a twist I'm having a hard time figuring out. I need to have a small form (name, email, phone) which when filled out (outside of joomla) gets emailed to client, subscribes the user to a specific acajoom newsletter and then redirects the user to another chronoforms form (within joomla)

What I've done so far:
Created both forms in chronoforms
I've tried using the
<?php
$email = JRequest::getVar('email', '', 'post');
$name = JRequest::getVar('name', '', 'post');
$MyForm->formrow->redirecturl = JURI::base()."index.php?option=com_acajoom&act=subscribe&listid=14&receive_html=1&email=$email&name=$name";
?>

but that takes me to a subscribe page. I don't want the user to have to fill out a form THEN fill out another subscribe form! I want it to be behind the scenes so to speak.

I can set it up to pass the name and email to the acajoom database fields of course, but it doesn't subscribe them to a particular newsletter. How do I subsribe them to a particular newsletter? ie, pass that information in a hidden field so that acajoom recognizes it? The database is not set up so that there is a "subscription" field.

Also, I'm getting random "You do not have permission to access this form" when I try to redirect to the 2nd form (which is a more detailed information form). What do I need to look for to make sure authentication is on target and fairly wide open here?

Thanks,

Jen Driller
Drillerweb.com
GreyHead 09 Mar, 2010
Hi jdriller,

You can do it with the CURL plugin which is exactly for those 'behind the scenes' transactions. I set one up with a basic Acajoom subscripion a couple of weeks ago.

There is one hang-up the published cURL plugin doesn't handle array values and in some cases Acajoom needs an array sent. I do have a hacked version that is working fine with arrays though. Please let me know if you need it.

Bob
jdriller 09 Mar, 2010
I'd love it. I'll have to brush off my array skills, but maybe I can figure it out :-)

jld at drillerweb.com

Jen Driller
drillerweb.com
jdriller 10 Mar, 2010
Actually I don't think I need an array unless I'm missing something. I am creating the form to subscribe to only one particular newsletter and I know which one it is, so I can hardcode the listid.

But I'm a little lost as to what I'd need to put in where in the cURL plugin for code. I see others trying to mess with it, but their's seems to be a bit more complicated than what I'm trying to accomplish.

Can you point me in the right direction? I'm really close. Man, I wish it was a simple relational database thing. I could just update the db fields upon submit. :-(
jdriller 10 Mar, 2010
Ok, I've been searching all over the forums and I see where you were talking about the array & where it cannot redirect two places. I'm trying to piece it all together.

And I guess there really is no twist. It's a common issue apparently.

Jen
GreyHead 10 Mar, 2010
Hi jdriller,

Here's the cURL plugin setup that I used. If I recall correctly 'subscribed' was the problematic array variable.

Bob
jdriller 10 Mar, 2010
I WONDERED how we'd need to implement the stuff from the acajoom form into the chronoforms form. This is the perfect solution. It works awesome. Something to note for anyone else trying to do this: You need to append the url with &passwordA=Pas$w0rd (if you're using acajoom version 5.1.2) and of course change the default password in the acajoom component and in the curl plugin.

Also update to the latest RC in chronoforms.

Your attachment was brilliant in helping me put it all together, GreyHead, thank you SOOOO much!

Jen
thomaslester 12 Feb, 2011
Hi Jen. Could you please tell me how to add &passwordA=Pas$w0rd to the url.
Seems everything else works.

Kind regards Thomas
GreyHead 12 Feb, 2011
Hi Thomas,

Please check the image about two posts before yours.

Bob
thomaslester 12 Feb, 2011
Hi Bob.

Thank you for your quick reply.
The error was that I did not set the Target Url to mysitename/index.php?option=com_acajoom

It doesn´t work for me without that.

I find Chronoform really great.

Kind regards
Thomas
This topic is locked and no more replies can be posted.