MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (http://forums.pti.com/index.php)
-   FusionPro® VDP Creator (http://forums.pti.com/forumdisplay.php?f=5)
-   -   Need a rule to let user choose btw picklist & "enter your own text" (http://forums.pti.com/showthread.php?t=1734)

bobk_IMbranded October 15th, 2010 12:08 PM

Need a rule to let user choose btw picklist & "enter your own text"
 
I want to offer a VDP Banner that will display some custom text. I want the user to be able to pick between typing their own text manually or, if they choose, pick from a drop-down menu of pre-determined messages.

I only want one to be displayed, so if they start off typing manually and then realize they would rather have the preset messsage, all they have to do is pick from the drop-down and the half typed in message is replaced with the drop-down message.

I'm worried the banner will display both. How can I set up the rule so one field clears out the other - basically resetting it start/blank?

I'm assuming the template will need two text boxes with one sitting in front/on top if the other. The customer should only see two field in the form, a input box and a picklist

Thanks

-bob

esmith October 15th, 2010 01:10 PM

Re: Need a rule to let user choose btw picklist & "enter your own text"
 
I don't use EFI, but I do work with custom front end portals. In your scenario, you would only need one text frame on your FP template with an associated rule that could check to see if the value of a field associated with the drop down list of preset messages is "custom" (in which case it would insert the contents of Field("Custom")) otherwise it would return the value of the preset message.

bobk_IMbranded October 15th, 2010 01:41 PM

Re: Need a rule to let user choose btw picklist & "enter your own text"
 
So if I understand you correctly...,

My data source has 2 fields, one for my dropdown (with values for each) and one for the custom field (with an empty value.)

My template has one text box.

I create the HTML form with 2 fields. One multi-line text box labeled "Custom" and one Picklist with my 5 pre-set choices with values (does one of the choices have to be "Fill in custom message"?)

And I create the rule below...

if (Field("Dropdown").indexOf(Field("Custom")) > -1)
{
return "<span>" + Field("Custom") + "</span>";
}
else
{
return "<span>" + Field("Dropdown") + "</span>";
}
return "";

esmith October 15th, 2010 02:31 PM

Re: Need a rule to let user choose btw picklist & "enter your own text"
 
That looks about right although I don't think you need the 3rd return since your rule would either return something from your picklist, or the contents of your custom field (if the picklist option for "custom value" is selected.

I don't know about EFI's capabilities, but if we were setting this up, I would go the extra measure of only displaying the custom text field on the portal when the "custom value" is selected in the pick list. :)

bobk_IMbranded October 15th, 2010 02:40 PM

Re: Need a rule to let user choose btw picklist & "enter your own text"
 
Me too.

I'd like to keep the custom field hidden until it is chosen from the drop-down. But I don't think EFI's Digital StoreFront will let me do that dynamically. I've tried with other templates.

Plus I don't have the JAVA chops just yet.

thanks


All times are GMT -7. The time now is 04:19 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.