Using Javascript to change multiple text field names

I have a pdf with multiple text fields. I need to change all the text field names (General -> Name) so that they are unique so that when I combine multiple pdfs together, the text fields will stay intact. Is there anyway to do this using javascript? Thanks!

I'm new to javascript too...it will be very helpfull for me too...Thanks
poltrone
prodotti chimici

Similar Messages

  • How do I use Javascript to populate a text field based on a selection from a drop down box?

    Greetings,
    I have virtually no experience with JavaScript and I am trying to figure out how to add some basic automation features to an Adobe form.  I have a drop down box called "Hospital_Name" that will contain approximately 7 possible selections.  When the user makes a selection, I would like to have the text field (called "Hospital_Address") below the drop down box populate with the corresponding address for the selection.  I have the "Hospital_Address" text field configured for multiple lines and would like the address to have a line break between the street address and the city/state/zip.
    For example, if the user selected "Hospital 1", the text field would display:
    123 Main St
    Anytown, CA 12345
    Any help or examples you can provide would be greatly appreciated.

    You have the element names within the object within brackets.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    // some debugging code to see location names;
    console.show();console.clear():
    for(I in Location) {
    console.println(I);
    // end debugging code;
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;
    This is not a beginners task but requires a fair amount of knowledge about the structure of objects, defining strings, and structure of arrays.
    Are you sure you have all the field names correctly spelled and capitalized?
    Do you get any error in the JavaScript console?
    Just trying the line that defines the "Location", I get the following error:
    SyntaxError: invalid property id
    1:Console:Exec
    undefined
    All the form field in a PDF are processed by using JavaScript and any error in any script will stop JavaScript processing.
    It might help to have a link to the problem form.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;

  • Changing a text field name in an existing PDF via VBA

    Using OLE, I am accessing a given form with the following code:
    Function GetTextFieldNames(strFormName As String, strFieldName)
    Dim myApp As AcroApp
    Dim acForm As Acrobat.AcroPDDoc
    Dim jso As Object
    Dim strTest As String
    Dim Field As Object
    'Set the object references
    Set myApp = CreateObject("AcroExch.App")
    Set acForm = CreateObject("AcroExch.PDDoc")
    acForm.Open (strFormName)
    Set jso = acForm.GetJSObject
    Set Field = jso.getField(strFieldName)
    'Clean up
    acForm.Close
    myApp.Exit
    Set myApp = Nothing
    Set acForm = Nothing
    End Function
    The two items that I would like to achieve are:
    1. Getting a list of fieldnames on the form referenced
    2. Changing the field name (in this case, a textbox or checkbox) programmatically.
    However, I have not had any success in retrieving a list of available field names, nor have I been able to modify the name of the field. Any ideas?
    i.e. It would be nice one could say
    For i = 0 to acForm.[FieldCount]
         Set Field = jso.GetField(i)
         Print Field.Name
    Next i
    ...and
    Field.Name = "NewFieldName"
    I hope that helps to explain what I am trying to accomplish. Any ideas are appreciated. Thank you!

    Have you consulted the documentation in the SDK about what methods are available? It will show you how to get the list of fields and/or the proper count for iteration.
    IIRC you can't change the name via VBA

  • Do I need to use javascript to get a text field in a PDF form to aut fill with current/today's date?

    I have a form for booking appointments and would like the date field to automatically fill with
    today's date and to print. I have set the text field's format to "Date" and when I place the cursor into the
    date field, today's date shows. It disappears as soon as I tab to the next field.
    Does this action require a javascript script to fill and print today's date? If so, where do I find that?
    Or is there another way to format the text field (besides typing today's date) to get the current date?
    Thanks.
    Ali
    using iMac 2.93 GHz Intel Core 2 Duo 8 GB | OS Snow Leopard 10.6.8 | Acrobat Pro 8

    Thank you GKaiseril!
    From the examples by Chris Dahl, I edited the script in the text field editing dialog to reflect the title I had given the field. That fixed the problem of today's date disappearing as soon as I tabbed to the next field.
    How do I choose for document level or page open script? I would like it to insert the date upon opening the document.
    Thanks again.
    Ali
    NOTE: I found the answer within Chris Dahl's tutorial... path is for Acrobat Pro 8: Advanced>Document Processing>Document Javascripts

  • Using javaScript to change a field from required to not required

    Hi,
    I have what seems like a simple question .I would like to know if it is possible to have a function call from my jsf code to a javascript function which could change a text field input from required to not required .
    I can do this through the server but would prefer to do it in the front end .
    e.g . I have a pull down list and when I click on one of the values it calls a function in javascript which changes a text field from required to not required .
    Hope this is clear .
    Thanks for your help.

    Instead of having the field required on the component defeiniton, put that requirement on code.
    Either way you can't do that on javascript. If you could do that then you could fool the aplication...

  • Using javascript to change the "Overall Result" cell in WAD

    Hi experts,
    I am trying to use javascript to change the text of the "Overall Result" cell in my web template using BI 7.0. I am not familiar with javascript, but I this is what I have done so far.
    I dragged the web item "Script" into my web template and I inserted the following code:
    function change_overall_result_to_average() {
    var cell = document.getElementsByTagName("TD");
    var cellText;
    for (i = 0; i < cell.length; i++)
          cellText = cell<i>.innerText;
               if (cellText == "Overall Result")
                     cell<i>.innerText = "Average";               
    In the XHTML view I am using added the onload function to start the javascript every time the web template is loaded. The code works fine when the web template is first loaded and the cell text is changed to "Average". However, if I navigate in my web template, the javascript function is not triggered, and the cell is therefore changed back to "Overall Result". For example, this happens when I pick another selection from one of my dropdown boxes, such as changing the selection from year 2008 to year 2007.
    I don't really know how to solve this problem in an easy way, and the current solution is not good enough. I hope one of you guys can suggest an easy way of fixing this:-)
    Best Regards,
    Morten

    Woodstock apparently renders some Javascript/DOM with some homegrown widget framework which on its turn renders the HTML DOM tree instead of plain vanilla HTML. Correct me if I'm wrong, to confirm this, just view the generated HTML source of the page.
    After some Googling I found out that you need getProps() and setProps() to get and set element attributes respectively.
    [http://google.com/search?q=webuijsf+domnode+site:sun.com].
    If you stucks with this, I recommend you to post this question at a forum or mailinglist devoted to Woodstock, e.g at their own homepage at dev.java.net or the Netbeans forum at nabble.com. You're here at a Sun JSF forum, not at a Woodstock forum.

  • Multiple text fields in Print Module

    Allow multiple text fields in Print Module with flexible editing.

    I'm with you on this. LR 3 has come along way on the print module but placing text anywhere on the page at any angle using any system font would go long way in making a great looking album page. If you are in the senior market you could add the customers name to a wallet sized image.

  • Populate drop-down list from multiple text fields.

    Just to begin, I am brand new to this application and brand new to coding in general. Anyways, this is what I am trying to accomplish. I need to populate a drop-down list from multiple text fields. I am able to populate one item using this in the calculate event:
    TextField1.rawValue
    After I type text in TextField1 and hit enter, it displays the text in the drop-down list. I need to do this but with more than just one text field to populate more options for the drop-down list. I will also need to do something similar with populating a drop-down list from selections made in multiple other drop-down lists.
    Thanks for any help you can give me.

    Thank you for your suggestion Geo Kaiser. With that, I was able to populate my drop-down lists, but now when I select an option from the drop-down list, the selection dissapears. The selection will appear briefly in the box but then dissapears although my drop-down list options remain there. Here is the code I am using for my text field to drop-down list:
    DropDownList1.clearItems()
    DropDownList1.addItem(TextField1)
    DropDownList1.addItem(TextField2)
    And here is my code for my drop-down list to populate another drop-down list:
    DropDownList3.clearItems()
    DropDownList3.addItem(DropDownList1)
    DropDownList3.additem(DropDownList2)
    Thanks again for your help. By the way, I am using Adobe Designer 7.0.

  • Reg Query For Multiple Text Fields

    Hi all
    I am New to this forum..
    I am developing an application for generating reports.
    In my application i have multiple text fields.
    The user might enter any of the textfields or even enter all the fields.
    In those cases how to use the query when some fields are empty??

    Welcome to the forum.
    It always helps to post a small, simplified example of what it is you're trying to achieve.
    (When posting examples, put the {noformat}{noformat} tag before and after the example, so it will get posted formatted on this forum.)
    In those cases how to use the query when some fields are empty??If your textfields serve as parameters/bind variables for you query, then you could use NVL.
    Something like:select ...
    from some_table
    where col1 = nvl(p_col1, col1)
    and col2 = nvl(p_col2, col2)
    And how about wildcards (the '%' or '_' sign), by the way? Are they allowed as well?
    You also might want to read about this approach:
    http://www.oracle.com/technology/oramag/oracle/09-jul/o49asktom.html                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Using plugin to display a text field

    How can I use plugin to display textfield?              

    It's a bit more complicated than you probably would expect: You need to
    load the AcroForm HFT and then execute the JavaScript to create your text
    field via the the AFExecuteThisScript() function.
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    [email protected]
    http://www.khkonsulting.com

  • Using javascript to change styles and such

    I want ot use javascript to change the "display" style of a
    div tag
    whatDiv.style.display = "block"
    This works fine if the div tag has an inline style defined:
    <div style="display:none"> ...</div>
    But if the tag has a class attached to it and the display
    :none is attached
    to that class, then it doesn't work
    <style...>
    div.hidden{ display:none; }
    </style>
    <div class="hidden"> ... </div>
    ... how can I remedy this?

    On Thu, 15 Jun 2006 17:20:54 +0000 (UTC), "jeremyluby"
    <[email protected]> wrote:
    >What gary is saying is that you should not use a class,
    but an ID only to
    >define the region.
    Nope. That's not what I'm saying. Regardless of whether
    you're using a
    class or not, if you get an object reference using an ID, you
    can change
    the properties. Consider this example:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Demo</title>
    <style type="text/css">
    .demo {
    background-color: #000099;
    border: 1px solid #000;
    color: #ffffff;
    text-align: center;
    height: 60px;
    width: 500px;
    </style>
    <script type="text/javascript">
    var bg="#009";
    function changeColor(x){
    o=document.getElementById(x);
    bg=(bg=="#009"?"#900":"#009");
    o.style.backgroundColor=bg;
    </script>
    </head>
    <body>
    <div id="test" class="demo">
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing
    elit.</p>
    </div>
    <p><a href="javascript:;"
    onClick="changeColor('test')">Change
    Color</a></p>
    </body>
    </html>
    Gary

  • QM03-Custom tab-Change to text field not reflecting-FG - XQQM-screen-0106

    Hi,
    I have a requirement to change the text field on a custom tab of QM03 transaction. Quality notification type is Z1 and the tab is "Checklist". Both are custom defined.
    The existing text field is of 3 lines. The new text message is of 8 lines. When I did the changes on the custom screen 0106 in the function group XQQM, the changes are not reflected on the QM03 transaction's custom tab. Only first 3 lines were reflecting the change and rest of the 5 lines are not appearing on the screen.
    Pointers on this will be definitely helpful.
    Regards,
    Mallika.

    I had a similar problem, but it was with the message line. I found that with Web Forms, I had to issue the Synchronize; a second time, but in Client/Server Forms 6i, the first synchronize worked. Here is the code I used:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy"> SYNCHRONIZE;
    if Get_Application_Property(User_Interface) = 'WEB' then
    synchronize;--first does not work on web
    end if;</font></pre>
    Let us know if this works.

  • Mass Change of TEXT field

    Hi
    I wanted to carry out Mass change of Text field in 2000 Financial documents, Can anyone give the best way to do the same?
    Thanks

    Hi,
    Execute the FBL3N report by selecting the Documents using Dynamic selection mention
    a) Document no's
    b) Fiscal year
    mention company code and execute the report and use mass change option to make changes.
    The following accounts may not appear in the listing
    a) Recon accounts in case these are not line item managed.
    b) If any of the documents have been archived.
    If you are on ECC6.0 or higher then you can use the report FAGLL03 report this would list the line items in the documents even if the Recon accounts are not line item managed.
    You can also record a SECATT/LSMW to do this for you in case you want different text for each of the line item.
    Regards
    K.R

  • It possible using javascript to change the value of another jsf text field?

    In my case, I have an input text field and would like to copy it's value on the onchange() event into another text field. Using the destination text field's Id and assigning some content with it's .value property

    Woodstock apparently renders some Javascript/DOM with some homegrown widget framework which on its turn renders the HTML DOM tree instead of plain vanilla HTML. Correct me if I'm wrong, to confirm this, just view the generated HTML source of the page.
    After some Googling I found out that you need getProps() and setProps() to get and set element attributes respectively.
    [http://google.com/search?q=webuijsf+domnode+site:sun.com].
    If you stucks with this, I recommend you to post this question at a forum or mailinglist devoted to Woodstock, e.g at their own homepage at dev.java.net or the Netbeans forum at nabble.com. You're here at a Sun JSF forum, not at a Woodstock forum.

  • Using JavaScript to change field in a Form

    I have a form with few fields. When a field 1 changes, I want field 2 automatically changes to "TBD". Can I do that with Javascript OnChange?
    Obviously I tried that but it doesn't work. I don't know much about javascript. Any help is appreciated.
    650-604-3035
    [email protected]

    Hi,
    Since in forms the fields are named diffently you cannot directly access the variables by the name. For example the column "EMPNO" in a form "EXAMPLE_FORM" is named as "EXAMPLE_FORM.DEFAULT.EMPNO.01"
    In the onChange event of field 1 the code would be something like this.
    for (i=0;i<document.forms[0].elements.count;i++)
    //gets the value of <field_name_1>. <field_name_1> can be copied from the html source.
    if (document.forms[0].elements.name == "<field_name1">)
    l_value = document.forms[0].elements[i].value;
    //sets the value of <field_name_2>. <field_name_2> can be copied from the html source.
    if (document.forms[0].elements[i].name == "field_name2")
    document.forms[0].elements[i].value = l_value;
    Hope that helps.
    Thanks,
    Sharmila

Maybe you are looking for

  • Adobe Acrobat XI Pro won't license

    Hello Adobe peoples, I get the installation done, get my account logged into, and the license key is seen as valid, but I get told that no qualifying product could not be found on the machine. I just installed it, done so twice already! What must I d

  • Camera/Flash issue in low light conditions

    I have an Xperia Z2 updated with android 4.4.4. When I try to take pictures at night I just get purple photos. This started just a few weeks ago out of nowhere. Let me say that the lens is not dirty nor blocked by anything. I don't have a case. I hav

  • Deletion of Inbound deliveries

    Hi All, I want to delete the all open old inbound deliveries with receipt history. All these inbound deliveries are showing in open inbound delivery list. How to proceed. Thanks in advance. Regards Surya

  • EP CRM Server Connectio

    Hi, We are planning to implement the ecommerce scanarios for CRM ,Can anybody let us know how do we link the Portal with the CRM server ,what are the steps required at Portal and CRM end.

  • Unable to found Bucket start date and bucket end date in OFSAA 6

    Hi, How to find the Bucket start date and bucket end date in OFSAA 6. I found following tables to mapped to Dim_Result_Bucket but  unable to found columns pointing to Bucket Start Date and Bucket End Date. Tables: fsi_income_simulation_buckets fsi_pr