Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PDF Forms and Checkbox

Explorer ,
Feb 25, 2008 Feb 25, 2008
Is there some trick to populating a checkbox on a PDF Form using cfpdfform? I need to check a couple of checkboxes on this PDF form. It will not accept anything I send to the field. I am not having any problems with any of the other text fields on the form, just the check boxes have this problem.

TOPICS
Advanced techniques
5.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 07, 2009 May 07, 2009

Did you find a solution for this problem? This is something i am not able to figure out right now either. What to do what to do?

thanks for any info.

dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 08, 2009 May 08, 2009

Check your "value".  Often it is due to using a wrong value, or the wrong cAsE.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 11, 2009 May 11, 2009

Below is my form for the checkbox:

<td

colspan="2">30.Paying wiht Credit Card (Select One)

</td>

<td>Yes<cfinput type="checkbox" name="creditCardY" id="creditCardY" value="Yes" onclick="SingleSelect('chk',this);"

>

No

<cfinput type="checkbox" name="creditCardN" id="creditCardN" value="No" onclick="SingleSelect('chk',this);"

>

</td>

Now on the PDF file I see the name of the checkboxes: Radio Button1.0 each on would has a value: yes and no

For my form I have tried Yes/No, 1/0, True/False

Does this help? Any new ideas?

Thanks

dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 11, 2009 May 11, 2009

fmdano wrote:

Now on the PDF file I see the name of the checkboxes: Radio Button1.0 each on would has a value: yes and no

What tool are you using to view the field information (pdfform action="info", acrobat .. ?).

Now on the PDF file I see the name of the checkboxes: Radio Button1.0 each on would has a value: yes and no

For my form I have tried Yes/No, 1/0, True/False

Are the checkbox values really lowercase yes and no, or is that just a typo?  Because cAsE matters (ie using "Yes" is not the same as "yes")

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 12, 2009 May 12, 2009

Hey,

I am using Acrobat 9 to view the fields...I am editing the fields and viewing what the field information is.

radio1.jpg

from the image above you can see the from name is Radio Button1.0 and each button is named Yes and No. However when you see them on the actual PDF file, they are checkboxes. Does this help any?

thanks for all your help in trying to solve this mystery.

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 12, 2009 May 12, 2009

from the image above you can see the from name is Radio Button1.0 and each button is named Yes and No. However when you see them on the actual PDF file, they are checkboxes.


That is odd.  What results do you get if you dump the form info using <cfpdf>? Also, did you try creating a simplified version, to make sure it is not a problem with this form?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 12, 2009 May 12, 2009

being very new to the cfpdf stuff, I am not even sure how to use cfpdf properly to dump out the form variables. This template pdf file was created by someone else, so it may be beneficial if I change the form values so it is easier to manipulate them.

thanks for the continued help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 12, 2009 May 12, 2009

Sorry, I meant to write <cfpdfform>.  What are the results of the cfdump?

<cfpdfform action="read"
      source="c:\pathTo\yourForm.pdf"
      result="info">

<cfdump var="#info#">

http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_p-q_03.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 13, 2009 May 13, 2009

Here is the dump info for the radio button. now what does this mean?

radio2.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 13, 2009 May 13, 2009

would it be easier for me to edit the pdf template and make each radio button a separate name since I am filling them in from a coldfusion page?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 13, 2009 May 13, 2009

fmdano wrote:

would it be easier for me to edit the pdf template and make each radio button a separate name since I am filling them in from a coldfusion page?

Radio buttons tend have the same name so they are grouped (ie only one can be selected at a time).  But since you are using them as a checkbox, yes use separate names.  BTW, is there not a checkbox type?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 13, 2009 May 13, 2009

Now,

my PDF file has two radio buttons one named radiobutton_yes and other radiobutton_no

below are my pdfformparams. Now, what am I doing wrong since i pass in this info, but still nothing is being checked. The form values are Yes for rb_yes, and No for rb_no. Does this cfpdfformparm look right?

<cfpdfformparam

name="RadioButton_yes" value="#arguments.form.creditCardY#">

<cfpdfformparam

name="RadioButton_no" value="#arguments.form.creditCardN#">

radio3.jpg

I feel like something is just off and I'm not sure what.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 13, 2009 May 13, 2009

Dump the form again.  What are the values?

1. What about the checkbox type? (I do not use acrobat 9.)

2. Any chance you could create a smaller version of the pdf (just the buttons) and upload it here?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 14, 2009 May 14, 2009

I may have finally figured out my problem. Since the values are in a structure, adobe 9 does not use dot notation to reference anything in the structure. So, I had to use a cfpdfsubform to name the main form: Radio Button1. Then inside that tag, I used my cfpdfformparm and named it 0 since that was the structure name:

<cfpdfsubform

name="Radio Button1"

>

<cfif isDefined("arguments.form.creditcardY")

>

<cfpdfformparam name="0" value="Yes"

>

<cfelseif isDefined("arguments.form.creditcardN")

>

<cfpdfformparam name="0" value="No"

>

</cfif>

</cfpdfsubform>

Looks like this solved my problem. I thank you for all your help. I may have found the answer in the CF LiveDocs, but without your help, such as how to dump variables, I think i'd still be a couple of days back.

Thanks again...if I have any other issues, I'm sure I'll post them here.

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 14, 2009 May 14, 2009
LATEST

I am glad you solved it. Interesting about pdfsubform. I was thinking more along the lines of using dot notation: "Radio Button 1.0" to reference the field. So thanks for posting the solution.

Cheers

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources