Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
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?