Skip to main content
Known Participant
December 28, 2009
Answered

Issue with hidden field and rich text

  • December 28, 2009
  • 2 replies
  • 440 views

Hey all,

I'm facing another issue and this time it is hidden form field. I've got the coldfusion rich text editor on one page and when submitted want to display a preview in another. However, in order to be able to insert the record afterwards I'm hiding initial form values in the hidden fields. All the values are fine except the one from the rich text editor as it gets output in full and is not hidden at all.

I assume this behaviour is caused by the formatted text and one of it's tags closing whole hidden field.

Any thoughts on how to store rich text in the hidden field?

cheers,

Simon

    This topic has been closed for replies.
    Correct answer BKBK

    Suppose the richText field is called myText. Then, in the action page, you may hide its contents with

    <cfinput name="myHiddenText" type="hidden" value="#htmlEditFormat(form.myText)#">

    2 replies

    BKBK
    Community Expert
    BKBKCommunity ExpertCorrect answer
    Community Expert
    December 28, 2009

    Suppose the richText field is called myText. Then, in the action page, you may hide its contents with

    <cfinput name="myHiddenText" type="hidden" value="#htmlEditFormat(form.myText)#">

    Inspiring
    December 28, 2009

    cfsavecontent might work.

    Or you could make it a session variable.