You can do what you want with JavaScript actions. Download the
Acrobat SDK and read the JS documentation.
Leonard
On Mar 30, 2008, at 5:16 PM, Haluk Acar Güner wrote:
Thank you ver much indeeed for a very useful piece of information.
Unfortunately I am using PdfFormFields (RadioButtons) and they
don't have the "setOptions()" method in order to set the "REQUIRED"
property. I don't know why, but I am sure there is a valid reason
for this.
Secondly, my application have multiple-page big forms
( Questionnaires to be more accurate) and I need to allow my users
save the partially filled forms to be submitted later. And I was
implementing this "Save" functionality with the SubmitAction which
would be a problem even if there was a "setOptions()" method to
make the form fields REQUIRED. That is why I was trying to do the
validation when the form is submitted with a Javascript function
before submitting the form.
It would be very usefull if there was a way of cancelling the
(chained next action) SubmitForm PdfAction following the Javascript
action that does the validation. But such as life, isn't it,
nothing is perfect.
Thank you again for your time & solution.
Kind regards
Haluk Acar Guner
On Sun, Mar 30, 2008 at 7:40 PM, <[EMAIL PROTECTED]> wrote:
-------------- Original message ----------------------
From: "Haluk Acar Güner" <[EMAIL PROTECTED]>
>
> My requirement is simple (or I thought so).
> When the user clicks on the Submit button, I want check that all
the fields
> are filled in (not empty) before submitting the form and not
submit the form
> otherwise.
Look for the "REQUIRED" option of TextFields. There is an example
of its use on page 485 in the book. Acrobat/Adobe Reader will not
"submit" a form that has "REQUIRED" fields that are empty.
> I am not able to add some kind of conditional PdfAction chaining
on my
> submit button
> so that I can cancel the form submit and stay in the form if
there is blank
> field.
Not necessary. See above.
> I went through whole of the book but couldn't find any possible
solution.
> Is it possible at all to cancel the submit action after a
javasicript
> validation action?
Yes. See above.
Constraints on number of pages for the book, imposed by the
publisher, prevented Bruno from including all of the material on
iText that *could* have been included in the book. IMO, if you had
included the online documentation in your quest, you would have
found this information for yourself.
If you wish to use iText successfully, the book is a mandatory
reference. I hasten to add, though, that you should also include
the book examples, the tutorial and its examples, the Toolbox and
its source code, the FAQs, the documentation (online or offline),
and the discussion list archives (this list, as well as the
Manning list), in your resource material.
Best regards,
Bill Segraves
----------------------------------------------------------------------
---
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/
marketplace
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
----------------------------------------------------------------------
---
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/
marketplace_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar