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

Reset form after printing

Community Beginner ,
May 06, 2016 May 06, 2016

Copy link to clipboard

Copied

I am new to Acrobat DC and am trying to create forms. I usually did this in Word but this works completely different.

I have made a form where one box should be ticked and one field should be entered with some data. After that it is printed.

Now I want to reset the form (clear the ticked box and empty the filled out field) once it has been printed without closing it and starting with a new form.

How can I do this.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

2.4K

Translate

Translate

Report

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
Advocate ,
May 06, 2016 May 06, 2016

Copy link to clipboard

Copied

Welcome to the new dimension of forms creating…

What you want to accomplish can be done, using some little JavaScript.

When your form is open in Acrobat DC, and the fields are set and tested, locate the JavaScript tools, and there select the Set Document Actions tool. A dialog will open, where you select the Document did Print entry, and click the Edit… button. A JavaScript editor window will open. There you enter

this.resetForm() ;

and then confirm all the dialogs and get back to the normal view. Don't forget to save the form.

And that's about it.

Hope this can help.

Votes

Translate

Translate

Report

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
Community Beginner ,
May 09, 2016 May 09, 2016

Copy link to clipboard

Copied

Thanks that works great.

Another question: on this forms are 5 boxes of which only one should be ticked. How can I set it that it is required to tick just one box (and not more than one box) Give all boxes the same name and make each box "obligatory" ?

Votes

Translate

Translate

Report

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
Community Expert ,
May 10, 2016 May 10, 2016

Copy link to clipboard

Copied

Use radio-buttons and set the group as "Required".

Votes

Translate

Translate

Report

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
Community Beginner ,
May 27, 2016 May 27, 2016

Copy link to clipboard

Copied

Thanks try67.

It works fine but I do not get a warning if none of the radio buttons is selected.

When I open the form, one radio button is selected, which I don't want: i want none selected and that it is required to select at least one radio button but also get a warning when I print the form that none of the raddio buttons is selected and another field id still empty which should be filled.

How do I get this done?

I now use a script to reset the form which works. It then shows all radio buttons as "open". Or should I add a script that resets the form when it is openend for the first time. Once it is used once and printed it resets as I would like to form to be when I open it (all radio buttons as open and the other field empty or default filled.

Votes

Translate

Translate

Report

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
LEGEND ,
May 28, 2016 May 28, 2016

Copy link to clipboard

Copied

Once a radio button within a group has been selected it can only be unselected by selecting another radio button. You can unselect all radio buttons in a group by setting the value of the group to "Off". You then need to save the form to make that state the default setup of the form.

Votes

Translate

Translate

Report

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
Community Beginner ,
Jun 07, 2016 Jun 07, 2016

Copy link to clipboard

Copied

My form will never be saved as a file but only used to print.

I have it made to reset after print to clear all field and radio buttons to off.

But now I can still print it if field is not filled or all radio button are "off"

How do It get a warning if or get it that it cannot be printed if none of the radio buttons in a group is "on"

Votes

Translate

Translate

Report

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
Community Expert ,
Jun 08, 2016 Jun 08, 2016

Copy link to clipboard

Copied

LATEST

You will need to use a script to validate the form before it is printed.

If you set those fields as required then you could use this script I've developed for that purpose:

Custom-made Adobe Scripts: Acrobat -- Validate Required Fields Before Printing or Saving

Votes

Translate

Translate

Report

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