Skip to main content
yanksgirl
Inspiring
January 11, 2024
Answered

Printing field mappings and javascripts?

  • January 11, 2024
  • 2 replies
  • 1180 views

Is there a way to print all of the text field names on a mapped form?  I have a form that a previous employee created and I need to recreate it on a slightly different updated version, but going through every field and matching to the javascripts and bouncing to my other screen is getting tiresome...if I had a way to print the text field names it would be awesome. 

 

i did use the Use JavaScript tool to pull the All javascript strings, which tells me what named text field it belongs to, but it would be so much easier if i could match that to a printed document that had those text field names on it.

 

Any help would be appreciated!

    This topic has been closed for replies.
    Correct answer try67

    Sure. Run this code from the JS Console:

     

    for (var i=0; i<this.numFields; i++) {
    	var fname = this.getNthFieldName(i);
    	var f = this.getField(fname);
    	if (f==null) continue;
    	console.println(f.name);
    }

    2 replies

    try67
    Community Expert
    try67Community ExpertCorrect answer
    Community Expert
    January 11, 2024

    Sure. Run this code from the JS Console:

     

    for (var i=0; i<this.numFields; i++) {
    	var fname = this.getNthFieldName(i);
    	var f = this.getField(fname);
    	if (f==null) continue;
    	console.println(f.name);
    }
    yanksgirl
    yanksgirlAuthor
    Inspiring
    January 11, 2024

    Thank you @try67 !

    kglad
    Community Expert
    Community Expert
    January 11, 2024

    in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

    p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



    <"moved from using the community">
    yanksgirl
    yanksgirlAuthor
    Inspiring
    January 11, 2024

    Thank you @kglad !  I realized it after I did it and created a new post but couldn't figure out how to delete.

    kglad
    Community Expert
    Community Expert
    January 11, 2024

    you're welcome.