2 Replies Latest reply on Jan 25, 2013 12:07 AM by Phinehas1234

    Generate doc from rtf template

    Phinehas1234 Level 1

      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.

        • 1. Re: Generate doc from rtf template
          relaxatraja Level 5

          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>

           

           

          • 2. Re: Generate doc from rtf template
            Phinehas1234 Level 1

            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?