Scribus Forums

Scribus => PDF Generation => Topic started by: Cris72 on February 14, 2013, 05:05:28 pm

Title: Required field issue
Post by: Cris72 on February 14, 2013, 05:05:28 pm
Hi all,
I'm new user of scribus and I was easily able to create a PDF fillable form, but I have some problem with "required" fields.

It's a form with only TEXT field and DATA type field and one Button to send data via email in FDF format ( I follow the hot to decoumentation to create it)

Problem is that the data are sent even if the "required fields" are empty.

What is wrong?
export settings is: PDF 1.5
Title: Re: Required field issue
Post by: asoujon on February 20, 2013, 11:02:33 am
Hi Cris72,

I have the same issue  :(.
The "required" property is recognized by Adobe Reader (v11), the textfields are lined out red, but I can send the form even when nothing is typed into the field.
If I add a textfield to the form through Acrobat Pro and give it exactly the same properties as the Scribus textfields, Adobe Reader does what it should and gives me the appropriate warning.
It is as if the Reader notices that a field was created outside Acrobat and ignores the validation.
I am not shure, but I think in former versions of Adobe Reader I did not encounter this problem. Since this seems to be rather a problem from Adobe, I doubt that there will be a solution in Scribus.
To solve this issue, there may be no other way than to add explicit validation code in JavaScript to the document.
I hope that I am wrong, so please anyone correct me and present a solution to this issue  :-* !

Cheers
Title: Re: Required field issue
Post by: JRBy on March 19, 2013, 01:05:13 am
Hi,

you should try this:

- name all your required field as "requ.something1", "requ.something2", "requ.something.else1", etc.

- make this JavaScript running when the document is opened*: this getField("requ").required = true;


* See: http://wiki.scribus.net/canvas/Your_second_PDF_form_with_Scribus_(and_Javascript)
Title: Re: Required field issue
Post by: JRBy on March 19, 2013, 01:37:50 am
Another way is to open the PDF using Adobe Reader XI*, to show the Console**, to paste the above JavaScript, then hit the enter key.

 :)


* (11, it cannot work with older versions)

** How can I display the JavaScript Console in Adobe Reader?
==> Download and install Reader JavaScript Console Window, available here: http://www.pdfscripting.com/public/Free_Acrobat_Automation_Tools.cfm