Various questions on forms creation

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

jotess
User
Posts: 48
Joined: Tue Jan 08, 2019 11:07 am

Various questions on forms creation

Post by jotess »

Hello,
I'm designing a form and I'm looking for a few features - maybe I don't find them, maybe they don't exist.
  1. Reflect the content of a text field in another place. Like entering a title in the very first field and having it displayed at the top of each subsequent page.
  2. Check box with three states: checked, unchecked and not decided. Sometimes, in other programs, you find check boxes that can be grayed out. This would enable me to make a checkbox a required field.
  3. Units. A field with content type "number" can have a currency symbol, but not a designation of the measurement unit. If there were a possibility to enter custom currency symbols, I could define a currency "mm" and set location "after" and this way I would have millimeters.
  4. Enable or disable a field, depending on the content entered previously into another field. Like enabling the field to enter an object's size only if the checkbox, that this object is present, has been checked.
  5. Transfer properties from one field to another. I have the impression, properties like, size, graphical attributes, content properties can not be transferred with the commands "Make Current Properties Default" and "Apply Default Properties" (as used for comments).
  6. Customize the default name for the exported CSV file, depending on a field's content. Or customize the suggested "save as" filename like this and thereby set the default for the exported file's name.
    Purpose: I have to fill the form multiple times and I want the results to be collected in a large spreadsheet. As one PDF file can hold only one set of data, I have to create a new PDF file for each object I want to fill a form for. So they have to have useful different names.
I hope the solution to my needs is not writing macros... Particularly for the last wish, I'm afraid it is.

One more thing I'm sure is a feature request: In the fields pane I use the manual mode to sort my items. It would help very much in a long list, if the items were numbered according to the tab order.
And if the collapsed/expanded state of the nodes would stay the way I have set it, after I have moved an item. My list is so long that it doesn't fit the screen and moving items is all the more tedious when the tree is expanded. Now after each move I have to collapse all, then expand the page, and then I can do my next move.

Best regards
Joachim
User avatar
Sean - PDF-XChange
Site Admin
Posts: 720
Joined: Wed Sep 14, 2016 5:42 pm

Re: Various questions on forms creation

Post by Sean - PDF-XChange »

Hi jotess,

1. I don't believe that is possible with the default Editor features, no.

2. Check boxes can be either checked or unchcked, there is no third option. You can however use the properties box to determine the mark used when boxes are checked, and you could set one of those to mean "undecided" if you wanted to do so. You can also use the properties to specify that fields are required.

3. I'm afraid units of measurement is not one of the default settings for fields. You could however pre-fill forms with "mm" if you wanted to specify millimetres - that's problably the best you can do there.

4. I don't believe this is possible with the default Editor features.

5. Yes, you're correct.

6. Also not possible, I'm afraid.

7. Your feature request for sorting fields in the field pane by tab order is a good one, I'll suggest it to the team.

8. Could you please provide a video to illustrate the issue you're having with the collapsed/expanded state of nodes?

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
jotess
User
Posts: 48
Joined: Tue Jan 08, 2019 11:07 am

Re: Various questions on forms creation

Post by jotess »

Hi Sean,
Expand_fields_tree.zip
some more comments/explanations:
  1. I had hoped that there would be some workaround like putting a field's content into a document property (e.g. title) with a java script action and using the title somewhere.
  2. The Point about "undecided" and "required" is: When a checkbox is required and its default state is, let's say, unchecked. Does the form know, that it is still unchecked and to submit it with the information "unchecked" the user would first have to check it to be able to uncheck it?
    Anyway, meanwhile I found out, that the submitting action is not any action like saving the file or exporting a CSV file but only that specific "submit" action where you upload a form to a URL. As I don't have a server to receive it, I can't use the submit feature anyway. And for exporting, all fields may be blank, I can't restrict this.
  3. Allowing custom currencies is not an option?
  4. Transferring properties and setting default properties would be a feature request.
Collapsing/Expanding fields tree: I have attached a zipped screen recording of what I mean.

Best regards
Joachim
You do not have the required permissions to view the files attached to this post.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12491
Joined: Wed Jan 03, 2018 6:52 pm

Re: Various questions on forms creation

Post by Daniel - PDF-XChange »

Hello, jotess

Thank you for coming back to us here. I wanted to offer a quick correction to Sean's post, and some additional notes/explanations.

1. Reflecting field data elsewhere
This is most certainly possible, you need only place another copy of the form field, with the same name, like so:
PDFXEdit_ilRDbRdCDo.gif
2. 3-state checkboxes
This one is unfortunately defined by the PDF Specification, and a checkbox can only have 2 states in a normal form field.
If you need to have more than 2 option, it would be best to use a "Radio button" group (with 3 separate buttons to pick), instead of a checkbox.

3. Units
Similarly to #2, The Specification itself does not have any allotment for "units" as a concept that fields make use of. If you need to have units in place, the best way to do so, while retaining exportability, is having an external "text" item, placed beside the form field, like so:
image.png
5. Form field defaults
Both setting defaults for newly created fields, and "applying" the defined defaults to an existing field are possible, but only with the "select fields" tool active:
image(1).png
6. Output names
while Sean is correct that these are not customizable, if you have multiple copies of the same form, or just multiple forms with all the same "field names" in place, PDF-Tools is our batch processing application, and offers the "export form data" tool, which can process multiple documents into a CSV sheet with each input file's data taking up one line.
image(2).png
Later when you try to import this, the Editor will allow you to choose which data set to use, or you can use the "populate forms" feature, to quickly re-create all of the files in one go.

8. Expanding tree error
Thank you for the video, I have reproduced this issue and will pass it along to the Dev team for review and hopefully resolution.
RT#7755: Bug: field order - unwanted expansion

Kind regards,
You do not have the required permissions to view the files attached to this post.
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
User avatar
rakunavi
User
Posts: 2063
Joined: Sat Sep 11, 2021 5:04 am

Re: Various questions on forms creation

Post by rakunavi »

Hello jotess,
jotess wrote: Thu Feb 12, 2026 10:14 pm Units. A field with content type "number" can have a currency symbol, but not a designation of the measurement unit. If there were a possibility to enter custom currency symbols, I could define a currency "mm" and set location "after" and this way I would have millimeters.
After selecting Custom Action as the "Format Value" Category in the text field properties, you might try selecting "Run a JavaScript" as the "Format Action" and specifying a script like the following.

Code: Select all

event.value = util.printf("%.2f mm", event.value);
  • figure.png
Best regards,
rakunavi
You do not have the required permissions to view the files attached to this post.
Top needs for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FullScrnMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12491
Joined: Wed Jan 03, 2018 6:52 pm

Various questions on forms creation

Post by Daniel - PDF-XChange »

:)
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
jotess
User
Posts: 48
Joined: Tue Jan 08, 2019 11:07 am

Re: Various questions on forms creation

Post by jotess »

rakunavi wrote: Fri Feb 13, 2026 11:57 pm ...

Code: Select all

event.value = util.printf("%.2f mm", event.value);
...
Wow, this works nicely. Though, I have to strip the letters after importing the CSV. But anyway: Where can I find a documentation of these number formats? Unfortunately, JavaScript is something I'm pretty clueless about.
Best regards
Joachim
User avatar
rakunavi
User
Posts: 2063
Joined: Sat Sep 11, 2021 5:04 am

Re: Various questions on forms creation

Post by rakunavi »

Hello jotess, thank you for your feedback.

The notation "%.2f" is based on a rule called Format Specifiers originating from the C programming language.

  • %: Signals the start of the format specification.
    .2: Specifies the number of decimal places. In this case, it means “display up to the second decimal place.”
    f: Indicates the value should be treated as a floating-point number (real number).
Unfortunately, Adobe's official JavaScript guide only states, “It is similar to the C function of the same name,” without providing any further explanation.

  • https://experienceleague.adobe.com/landing/acrobat-mobile-deployment/iosapi/classes/util.html
However, since there are numerous resources on the C programming language available online, you should be able to find many excellent resources through online searches or by asking AI.

Best regards,
rakunavi
Top needs for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FullScrnMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
jotess
User
Posts: 48
Joined: Tue Jan 08, 2019 11:07 am

Re: Various questions on forms creation

Post by jotess »

Thank you, this hint helped where and how to search.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 720
Joined: Wed Sep 14, 2016 5:42 pm

Re: Various questions on forms creation

Post by Sean - PDF-XChange »

:)
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
jotess
User
Posts: 48
Joined: Tue Jan 08, 2019 11:07 am

Re: Various questions on forms creation

Post by jotess »

With Javascript (and little AI help) I managed to solve my issues no. 1+6.
  1. Define document-wide variable:

    Code: Select all

    var Formulardaten = {
        TN_Geb:  "",
        TN_Ebene: "",
        TN_Nr_alt:  ""
    };
  2. Add Script to text field(s):

    Code: Select all

    // On Blur – Feld "TN_Geb"
    var eingabe = event.value;
    if (eingabe !== "") {
        Formulardaten.TN_Geb = eingabe;
    }
    syncTitel(); // Titel neu zusammensetzen
  3. Add another script at document level. This makes up a document tile from the content of 3 fields:

    Code: Select all

    function syncTitel() {
        if (Formulardaten.TN_Geb !== "" && Formulardaten.TN_Ebene !== "" && Formulardaten.TN_Nr_alt !== "") {
            this.info.Title = Formulardaten.TN_Geb + "-" + Formulardaten.TN_Ebene + "-" + Formulardaten.TN_Nr_alt;
        }
    }
  4. Add button:

    Code: Select all

    var dateiname = this.info.Title + ".pdf";
    this.getField("Dateiname_Anzeige").value = dateiname;
    try {
        app.setClipboardContents(dateiname);
    } catch(e) {
        // ignore if not supported
    }
    app.execMenuItem("SaveAs");
  5. Add text field with the name "Dateiname_Anzeige".
To just reflect one field's content in another place, it takes just a few parts of this. In my example, the content of the variable dateiname should be put into the clipboard to be able to just paste it when the save as dialogue opens. But this passing into the clipboard doesn't work. So the user has to copy the name from the field Dateiname_Anzeige first and then save.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12491
Joined: Wed Jan 03, 2018 6:52 pm

Re: Various questions on forms creation

Post by Daniel - PDF-XChange »

Hello, jotess

I am glad to see you found a working solutiuon... though I cannot help but note that there is an easier way to do both tasks, instead of using javascripts (which many recipient clients may have disabled for security reasons) or requiring manual copy/paste)...

Did you see my notes on the two items in my previous post?
Daniel - PDF-XChange wrote: Fri Feb 13, 2026 5:00 pm 1. Reflecting field data elsewhere
This is most certainly possible, you need only place another copy of the form field, with the same name, like so:
Image
Daniel - PDF-XChange wrote: Fri Feb 13, 2026 5:00 pm 6. Output names
while Sean is correct that these are not customizable, if you have multiple copies of the same form, or just multiple forms with all the same "field names" in place, PDF-Tools is our batch processing application, and offers the "export form data" tool, which can process multiple documents into a CSV sheet with each input file's data taking up one line.
Image
Later when you try to import this, the Editor will allow you to choose which data set to use, or you can use the "populate forms" feature, to quickly re-create all of the files in one go.
Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
jotess
User
Posts: 48
Joined: Tue Jan 08, 2019 11:07 am

Re: Various questions on forms creation

Post by jotess »

Hi Daniel,
thank you for that hint - I actually overlooked your post! I must have somehow scrolled past it. The solution with just another copy of the field is actually much simpler. And the hint for the PDF-Tool seems very valuable, I have to look into that. I expect to have a couple of hundred SCV files to process.
Best regards
Joachim
User avatar
Sean - PDF-XChange
Site Admin
Posts: 720
Joined: Wed Sep 14, 2016 5:42 pm

Re: Various questions on forms creation

Post by Sean - PDF-XChange »

:)
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623