Forum OpenACS Q&A: How do I use noquote with template::element::set_value ?


I'm trying to set the value of a form element and I want to noquote it (it contains the Euro symbol), but I can't seem to find a way to do this? Has anybody an idea how to achieve this?


No replies. I ended up having to put the Euro symbol in the label, which is far from ideal but better than not displaying it. If anybody knows how to use noquote in form builder, let me know.


Brian you can do it by using "display_value" attribute.

eg. if you have a HTML description field which is coming out as quoted HTML you can do this to display value as non-quoted

template::element create $form_id survey_description \
-datatype text \
-widget text \
-label "[_ smart-forms.Description]" \
-value "$survey_description" \
-mode $mode \
-display_value "$survey_description"

You don't even need the noquote tag...