Form - Select - Keywords - split value and name


(paul walker) #1

Hi Folks
I want to use the value (not the visible name) from a ‘select’ control on a form.
For example;
value = x, name = x is a great letter

when I use - %response_1238711_q4d_raw% - I get; ‘x is a great letter’

How do I just get x

Yours in anticipation - cheers
paul


(Bart Banda) #2

Try and use either
%response_1238711_q4d_key%

or
%response_1238711_q4d_value%

to get either the value or key


(paul walker) #3

Hi Bart
thank you for your response. However, whether I use _raw, _key or _value appears to make no difference to the display - I seem to only ever see the text, not the value
I am using SM 5.5.2.3 - would this make a difference?
cheers
paul


(Bart Banda) #4

Hmm, weird. Where are you printing the keyword? On the thank you page of the custom form or somewhere else?


(paul walker) #5

Hi Bart
In a custom form on the confirmation bodycopy page.
I did find another way around the problem this presented for me but Id still be intrigued to find out why the keywords do not display what I want them to


(Bart Banda) #6

How did you work around it?

Yeah it’s weird that it’s not working for you. Would be interesting trying with a brand new form and a simple select field to see if you can replicate it that way.


(paul walker) #7

Hi Bart
So my work-around was much simpler than the complicated way I was trying to do it in the first place. I was originally trying to use a switch statement to get the value (rather than the key) and create a variable to hold a different URL based on each response. This worked fine in the bodycopy pages but could not be used in the ‘Email options’ as the was stripped. This is because there is only the option for a wysiwyg editor

However, I replaced the key in each of the select items with the actual URL and even though I use an image - it delieves a URL to the image I wanted to select.

I will go back and play with the %_key% option later


(Bart Banda) #8

Ah gotcha, thanks for clarifying. yes, the old email WYSIWYG format issue, we def need to solve that problem soon!