Conditional for Freeform and Simple Commerce
Posted: 22 October 2007 04:01 PM   [ Ignore ]
Newbie
Avatar
Rank
Total Posts:  5
Joined  2007-05-30

Greetings,

I’m working on a site which offers Summer and Winter camps for children.  The fee for the camp depends on the number of children a parent enrolls for a camp event.

My plan is to have the parent, once they login into the EE site, to fill out a Freeform with all the pertinent data about their child. Somewhere on the form, the parent will check a checkbox for the number of children they will be enrolling.  So that if 2 children are enrolled, upon submit, I would like to send them to a Simple Commerce entry with the cost for two children which then would send them to PayPal.  The Freeform will be sent to the site’s owner, and one to the parent.

I’m thinking something like:

{  if check box 1 ==‘’  redirect to }

Or something like that. Obviously, I don’t know enough about how to write these conditionals..

Any help or alternative ideas would be greatly appreciated.

Regards,

Fernando

Profile
 
 
Posted: 23 October 2007 05:57 PM   [ Ignore ]   [ # 1 ]
Newbie
Avatar
Rank
Total Posts:  5
Joined  2007-05-30

anyone? please?

Profile
 
 
Posted: 23 October 2007 06:07 PM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  736
Joined  2004-03-30

This is not likely a job for Freeform. More appropriate for some custom code.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 23 October 2007 06:12 PM   [ Ignore ]   [ # 3 ]
Newbie
Avatar
Rank
Total Posts:  5
Joined  2007-05-30

Thanks for the reply Mitchell..

Profile
 
 
Posted: 23 October 2007 07:23 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  736
Joined  2004-03-30

Sorry it wasn’t more positive. E-commerce requires some investment I’m afraid.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 24 October 2007 12:18 AM   [ Ignore ]   [ # 5 ]
Newbie
Avatar
Rank
Total Posts:  5
Joined  2007-05-30

I understand.. Basically, what I needed was a way to redirect the user based on which choices they made. The redirection does not have to be to an e-commerce page at all.  It could just be to a thank you page or something like that..  Thanks anyway….

Fernando

Profile
 
 
Posted: 24 October 2007 07:15 PM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  736
Joined  2004-03-30

Fernando,

Sorry that I didn’t understand that. Unless I changed the code some time ago, the return URL for the form submission is stored in a hidden field. Some people write Javascript to change that value depending on the selection of a radio button or some other field. When the form is submitted, the modified return URL kicks. Unless I’m smoking something that is.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 25 October 2007 04:01 AM   [ Ignore ]   [ # 7 ]
Newbie
Avatar
Rank
Total Posts:  5
Joined  2007-05-30

Now we’re both smokin’ ! That’s exactly what I’m what I’m looking for.. Now in search of a javascript..

Thanks,

fb

Profile
 
 
Posted: 25 October 2007 08:09 AM   [ Ignore ]   [ # 8 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  736
Joined  2004-03-30

Your starting point is jQuery. jquery.com.

mk

 Signature 

Mitchell Kimbrough

Profile