Forum OpenACS Q&A: Allowing HTML tags in form template elements?

How do you permit users to use HTML tags when entering data in forms generated with template elements?
Collapse
Posted by James Thornton on
any ideas? When submitting a form with HTML tags it says "please back up and remove HTML tags". Thanks.
Collapse
Posted by Bart Teeuwisse on
James,

did you remember to set the datatype of the form element to html?

/Bart

Collapse
Posted by James Thornton on
I tried that, but html isn't a valid datatype in my version -- is it supposed to be?
Collapse
Posted by Bart Teeuwisse on
James,

you are right, html isn't a valid datatype. I more or less assumed there would be one. ;) Try 'text', the text datatype validates any input.

/Bart

Collapse
Posted by James Thornton on
Bart, I have been using the text datatype, and it isn't allowing the inclusion of HTML tags...
Collapse
Posted by Bart Teeuwisse on
In that case James, the error is not in form element but elsewhere. Could you post your code?

/Bart

Collapse
Posted by James Thornton on
Bart -- you're right...the page is redirecting to "form 2" where it is setting the form 1 values with ad_page_contract, and ad_page_contract does not allow HTML tags by default. Thanks for your help.