Check Boxes...
Was wondering how would one program in a check for a checkbox? I have tried:
[_pdfViewController.document.forms setValue:@"Yes" forFormWithName:@"Married"];
[_pdfViewController.document.forms setValue:@"YES" forFormWithName:@"Married"];
[_pdfViewController.document.forms setValue:@"1" forFormWithName:@"Married"];
[_pdfViewController.document.forms setValue:@"Y" forFormWithName:@"Married"];
But none of them added a check to the box. I have checked and double checked the form name thinking I may have typed it in wrong but it is correct.
Thanks
Open the .pdf in Adobe Acrobat. Tools->Edit and then select the checkbox, go to the page Options and set you "true" value in the Export Value. For example YES, Yes ... etc
document.forms.setValue("Yes", forFormWithName: "CB1")
Note: CB1 is checkbox in my pdffile as @jaouahbi said you need to open pdf in acrobat and check checkbox properties under option tab for export value mine is "Yes" and it works
One question thout @Lancewise, where did you put these command in the viewcontroller
in my case I am working in swift and I had to put in the app delegate which I don't want to but in the respective viewcontroller file, any suggestion