Skip to main content
Participant
March 8, 2018
Question

CFHTMLTOPDF tag does not function correctly with radio groups that have no selected option

  • March 8, 2018
  • 1 reply
  • 860 views

I am trying to use the <CFHTMLTOPDF> tag to generate PDF output but radio groups that have no option selected is appearing in the PDF output with the first option selected.  If I wrap the same HTML around the <CFDOCUMENT format="PDF"> tag, the radio group in the PDF output is rendered correctly (no radio buttons are selected in the group).

Is this a bug with the <CFHTMLTOPDF> tag?  Is there any workaround for this issue?

Thanks for your help.

This topic has been closed for replies.

1 reply

Charlie Arehart
Community Expert
Community Expert
March 9, 2018

Henry, I’m not aware of any such bug.

But I would always suggest in a case like this that you would really help yourself to create a simple 5-10 line demo of the problem. Sometimes you’ll find out that the problem is not quite as obvious as it seems, as it may go away in the “simple demo”, which means that there’s some relationship that you’re not considering that really causes the problem. Perhaps in identifying that, you identify the issue and then can have others test if they see that same problem.

Along those lines, you should also report exactly what version of CF you’re running (and what update level), as someone else may try it on another release where it works. Finally, you may want to make sure there were no errors in any CF updates you applied. For that last point, see my post:

http://www.carehart.org/blog/client/index.cfm/2016/9/6/solve_common_problems_with_CF_updates_in_10_and_above

Hope that helps.

/charlie

/Charlie (troubleshooter, carehart. org)
HenryHsuAuthor
Participant
March 9, 2018

Thanks for the reply. I am currently using ColdFusion 11.0.13.303668.  Here is the simplified demo that I ran:

<cfhtmltopdf>

     <div>

          <input name="test_radio_group" type="radio" value="Y"> Yes

          <input name="test_radio_group" type="radio" value="N"> No

     </div>

</cfhtmltopdf>

When I ran the above code, the first radio button (i.e. Yes) would be selected.  However, if I run the following code, the PDF output would appear correctly (i.e. no radio buttons are selected):

<cfdocument format="PDF">

     <div>

          <input name="test_radio_group" type="radio" value="Y"> Yes

          <input name="test_radio_group" type="radio" value="N"> No

      </div>

</cfdocument>

Try it out and let me know if you see the same behavior.  Thanks for your help.

WolfShade
Legend
March 9, 2018

Report this as a bug, I will vote for it.

I tried this on my CF 11.0.0.289974 and it's doing the same thing.

CF10 doesn't recognize CFHTMLTOPDF. 

V/r,

^ _ ^