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

Delete button, add page button, mobile forms, multiple devices - FORMS

Community Beginner ,
Feb 25, 2022 Feb 25, 2022

Hello everyone,

 

I am trying to create a form that is fillable for other users. The main goal is to create a "maintenance book" for my technicians, so I need buttons such as: delete page, add new page, save form.

I have already managed to spot a form that has a button that creates a new page, so I have a javascript code for this.

I found an information that I need to convert a form to a template. If I already have created a form in Adobe Reader Pro DC(for now trial version)  am I able to convert it to the template in that app? 

Second thing, could someone provide me the javascript code for the "delete one page" and "save form function"?

And last question, When I will have a licence for one user, should I also buy it for my technicians so that they are able to fill the forms? The will work on android smartphones only.

TOPICS
Edit and convert PDFs , How to , JavaScript , PDF forms
2.5K
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
Community Expert ,
Feb 25, 2022 Feb 25, 2022

This will not work in Acrobat Reader on Android.

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
Community Beginner ,
Feb 25, 2022 Feb 25, 2022

Even if I buy for each technician a subcription?s

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
Community Expert ,
Feb 25, 2022 Feb 25, 2022

With a Premium subscription the users can add and delete pages per UI.

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
Community Beginner ,
Feb 25, 2022 Feb 25, 2022

What do you mean by User Interface? I checked that the Android doesn't support JS. 

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
Community Expert ,
Feb 25, 2022 Feb 25, 2022

I mean the UI of Acrobat Reader.

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
Community Beginner ,
Feb 25, 2022 Feb 25, 2022

But only in the Windows as I suppose?

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
Community Expert ,
Feb 25, 2022 Feb 25, 2022

No. Also on Android, iOS, and Mac.

Look at the help of Acrobat Reader on Android.

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
Community Beginner ,
Feb 25, 2022 Feb 25, 2022

That's good. Do you maybe know how can I convert form into a template? Because as I suppose that is a must, to be able to add a button with funcionality (add page, delete page)?

Also, do you know the JS scripts for deleting the previous page and saving the document?

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
Community Expert ,
Feb 25, 2022 Feb 25, 2022

Acrobat Reader on Android or iOS doesn't supports this scripts.

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
Community Beginner ,
Feb 25, 2022 Feb 25, 2022

I see. In that case I would have to buy a tablets with Windows. Are you able to tell me, how can I convert form into a template? As I understand that is the only way to create a new page with blank form to fill up with a click on the button?

Second thing, is there a script that can create a table on a new page after I cick on the button?

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
Community Beginner ,
Feb 26, 2022 Feb 26, 2022

I was able to solve the majority of my concerns. Few more questions left. I want to create a button wit JS that will allow me to duplicte the form fields, is it possible? Or maybe it will be easier for me to create a one page template filled up with all the fields that I need and then hide those which won't be used. That solution is easier to perform as I suppose?

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
Community Expert ,
Feb 25, 2022 Feb 25, 2022

It's not a subscribtion issue.

The mobile version of Acrobat don't really support Javascript , it cannot spawn a new page, it cannot delete a page, etc.

 

If you really need mobile devices for technicians to use this form, you should use Windows tablets.


Acrobate du PDF, InDesigner et Photoshoptographe
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
Community Beginner ,
Feb 25, 2022 Feb 25, 2022

Windows tablets is also a solution, sure. 

Second option could be just to fill out the form by technician onsite. He won't be creating a new page to the already created maintenance book, but just a single form. Then someone in the office can add this form to the maintenance book on the PC. Obviously that is not the best option. 

Is there a way that a picture can be added on the android to the form or it also has to be done on the Windows device only?

Maybe there are apps specially designed for androids with the functionality that I need. Anyone knows any?

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
Community Beginner ,
Feb 25, 2022 Feb 25, 2022

Ok, I have noticed that I am not able to upload any file to the form.

Just to be sure, I don't need to buy new subscriptions for the end users on the Windows tablets? 

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
Engaged ,
Feb 25, 2022 Feb 25, 2022

Like most, I was of the opinion that (on an iOS) device, 'spawning' as such of pages wasn't possible - there is now a way that you can actually achieve a very similar result on an iOS device, and using the Fluix application - tried it out, really good....link below might explain more clearly (ah, should add of course that Fluix isn't aimed at the individual user - it's a lot more than that!);

 

https://fluix.io/help/how-to-duplicate-pages-in-a-pdf-form-using-javascript

 

Also, does require the page to be copied, to be visible....but I can see this being a very admirable solution in many instances if not using a Windows device/Adobe DC....

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
Community Beginner ,
Feb 25, 2022 Feb 25, 2022

I see. Unfortunately for my company the most affordable option would be to add that function to the android devices or to buy for each technician a tablet with Windows.

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
Community Expert ,
Feb 26, 2022 Feb 26, 2022

The free Acrobat Reader is the same for Windows computers and Windows tablets, unlike the Android and iOS "Mobile" versions.

In this case, you only need one version of Acrobat Pro to create forms, and Acrobat Reader for the technicians' devices.


Acrobate du PDF, InDesigner et Photoshoptographe
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
Community Beginner ,
Feb 27, 2022 Feb 27, 2022

I have one more question. Is it possible to put page number but only at a specyfic page? For example I have 4 template pages but 3 of them are hidden and only first one is visible. I make the rest of the pages visible only when I need to. I would like to have number only at the first template page and it will count only first page templates, hidden pages (even when they are shown) won't be taken into the counting.

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
Community Expert ,
Feb 28, 2022 Feb 28, 2022

Create a text form field on each template page using this script as a Calculation script:

event.value = (event.target.page[1] + 1); // page number only

or

event.value = (event.target.page[1] + 1) + " / " + this.numPages; // page number + total of pages

 

This script does not work on static (not spawned) pages.


Acrobate du PDF, InDesigner et Photoshoptographe
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
Community Beginner ,
Mar 05, 2022 Mar 05, 2022

Thank you. I will check it. 

I am facing a new problem. I want to show/hide elements on a spawned page with a checkbox. I works just fine on a not spawned page. But I have a problem with the page that is spawned. Here is my JS code for this checkbox:

var nDisplay = event.target.isBoxChecked(0) ? display.visible : display.hidden;

this.getField("P" + (this.numPages - 1) + ".TemplateName.ElementName").display = nDisplay;

 

The js for spawning the page is:

 

The JS for spawnig the page is:var SpawnPage = this.getTemplate({cName: "TamplateName"});
SpawnPage.spawn({nPage: this.numPages, bRename: true, bOverlay: false});
this.getField("P" + (this.numPages - 1) + ".TemplateName.Name").setFocus();

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
Community Beginner ,
Mar 05, 2022 Mar 05, 2022

My mistake. Something was wrong or I am to tired. Everything works.

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
Community Beginner ,
Mar 05, 2022 Mar 05, 2022

Ok. I have noticed that it works kinda strange. When two pages are spawned they somehow corelate to each other. I will try to figure it out, but if someone already knows an answear I would be grateful ; )

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
Community Expert ,
Mar 05, 2022 Mar 05, 2022

What do you mean by "corelate to each other", exactly?

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
Community Beginner ,
Mar 05, 2022 Mar 05, 2022

When I spawn a page with elements that can be hidden or visible nothing happens when I have the script from above and check the checkbox. When I spawn another page with those elements, then when I check a checkbox in both tables, then I am able to show and hide that element. There must be a small mistake in this script. I am not able to spot it.

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