Skip to main content
Jan 24, 2013 3:44 AM UTC
Question

Generate doc from rtf template

Hi,

I find there is a method on generate Word document from a template (rtf). The reference link is: http://www.jensbits.com/2009/06/21/using-coldfusion-to-generate-a-word-document/

And it is nice and easily for us to maintain. However, in our template, we have some checkboxes. Does anyone know how to tick the checkbox or untick the checkbox in ColdFusion.

    This topic is closed to new replies. Start a new post to keep the conversation going.

    2 replies

    Jan 25, 2013 8:07 AM UTC

    More problem,

    Can rtf shows HTML?

    We have a table cell and it is allowed to inputted the HTML tag. However, we found that it cannot show HTML correctly. For example, if the text contain "<u></u>", it shows "<u></u>", not underline the wordings.

    Is there any methods on showing HTML input in rtf file?

    Translate
    relaxatraja
    Inspiring
    Jan 24, 2013 7:54 AM UTC

    CFML:

    <body>

    <p><label>Back to top</label> <br />

    <cfinput type="checkbox" name="Back" value="">

    <label>Discipline</label> </p>

    <cfinput type="checkbox" name="Discipline" value="">

    </body>

    Condition check on submit:

    <cfif !isDefined('FORM.Back')>

        <cfset back=0>

    <cfelse>

        <cfset back=1>

    </cfif>

    <cfif !isDefined('FORM.Discipline')>

        <cfset discipline=0>

    <cfelse>

        <cfset discipline=1>

    </cfif>

    Translate