Different responses to user
Posted: 04 July 2008 07:07 AM   [ Ignore ]
Newbie
Rank
Total Posts:  21
Joined  2007-05-03

Hi,

I’d like to know the best way to do this. I want to have a different response to the user submitting the form based on an option selected in the form.

What’s the best way to go? Probably can’t use {if}{/if} in the response template. Does this need to be custom coded?

Profile
 
 
Posted: 04 July 2008 07:24 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3373
Joined  2006-10-18

I’m not exactly sure what you’re after here.

I’m assuming you have a custom field that asks a User a question in their profile?
Then, based on their answer, you’d like different content displayed?

If so, you’d do it like this (depending on what you’re after):

If they’ve filled in the field:

{if custom_field_1}This will show {custom_field_1} contents{/if}

If you’re after showing content based on say, a Yes/No field:

{if custom_field_1 == "yes"}This will show {custom_field_1} contents.{/if}

If you’re after different content being displayed per type of answer submitted:

{if custom_field_1 == "pies"}You love to eat Pies!{/if}
{if custom_field_1 
== "cheesies"}You love to eat Cheesies!{/if}
{if custom_field_1 
== "donkey"}You love to eat Donkeys!{/if}

 Signature 
Profile
 
 
Posted: 04 July 2008 07:30 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  21
Joined  2007-05-03

all great options. Thanks for the super quick reply Pie Man!

Profile
 
 
Posted: 04 July 2008 07:34 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3373
Joined  2006-10-18

Sorry… for some reason I thought this was a User Module question… although the code above would work roughly the same way smile

 Signature 
Profile
 
 
Posted: 04 July 2008 07:41 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  21
Joined  2007-05-03

Sorry, I think I may have skipped over what you wrote there. Would those {if} conditionals work in an freeform email template? That’s where I would like the conditions to happen.

Profile
 
 
Posted: 04 July 2008 07:54 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3373
Joined  2006-10-18

Oh this is for a notification templates…

They should.... give it a whirl and see LOL

 Signature 
Profile