Raw keyword missing for form answer in asset list


(Anthony) #1

On a custom form email page or confirmation page I can use a keyword like %response_X_qY_raw% to show the underlying value the user chose from a select list (in my case the values are asset numbers and the display text is the name of the asset).

 

But when using an asset list to display the form submission results elswehere on the site, I can only use %question_answer_X_qY% to get the display text of the selected option. There doesnt seem to be an equivalent %question_answer_X_qy_raw%.

 

Does anyone know a workaround? It seems like an obvious omission that the _raw should be supported on all the possible keywords that return form results? Enhancement request?

 

Thanks

Anthony


(Bart Banda) #2

Yea I would have thought this would work as well, which version of Matrix are you working with? You can append _key and _value when printing metadata select fields, but not sure if it works for form submission assets. 

Try %question_answer_X_qy_key% or %question_answer_X_qy_value%. I'll have a text on the latest version of Matrix when I get the chance, and if that doesn't work, I'll ask Squiz Labs if we can add it in. 


(Anthony) #3

Hi Bart,

 

I've just tried _key and _value and sadly no luck. Interestingly neither generates an invalid keyword, it just outputs the display description for either (as does _raw).

 

I'm on 4.4.2 but have Squiz coming in September to do a big upgrade for us. So if it could get on the enhancement list that would be great.

 

Thanks for your help


(Bart Banda) #4

Hi Anthony,

I just got word from our developers, it is supported but not documented in the manuals (they will add it in).

The correct keyword format is this: %question_answer_key_X_qY%, so for example: %question_answer_key_123_q1%

 

Let me know how you go.


(Anthony) #5

Tested and works perfectly! Thanks so much for the help Bart.

I wonder how many other undocumented gems are out there just waiting to be discovered :)