change a caption of text field based on two fields

It's a bit complicated (for me anyway). So, bear with me on this while I try to explain it properly.

Problem: I have two fields tfLastName and tfFirstName - in that order. I have another tfSignatureLine field. I need the legend on tfSignatureLine to change according to the value of the name and last name fields.

Address: The two fields have a script output. This is the output for tfLastName script.

if (!this.isNull && !this.parent.tfFirstName.isNull){ //first check to see that both fields have something in them.
          var name = this.parent.tfFirstName.rawValue + " " + this.rawValue; //create a variable that combines the values of the fields
          this.parent.parent.tfSignature1.resolveNode("caption.value.#text").value = name; //change the caption to the name
}

Of course, the output for tfFirstName script has the appropriate fi verification statement he and tfLastName.

Error (operating time): When you fill in the fields, the second field to be left is the one who will update the name.

Example: Assume that you are filling out a form for John Smith. Then, you enter 'Smith' tfLastName and 'John' in tfFirstName. tfSignatureLine now says 'John Smith'.

Then he said: "BTW, it's"Jon"with no 'h..'" "then, you update this field. tfSignatureLine said: "Jon Smith".

Then he said, "and it's 'Smyth' with a 'y' instead of 'i'." You update tfLastName and exit the field. tfSignatureLine is not updated. I've always said "Jon Smith". You continue and exit tfFirstName. THEN tfSignatureLine is updated.

If you reverse the order (perhaps), tfFirstName will not update to tfSignatureLine, but tfLastName.

Ideas: It almost feels like the problem is with the help of 'resolveNode' for the legend in the code. I couldn't find another way to change the caption without her, however. Is there something that I missed because I looked in this? Maybe something like "this.caption.value" or "this.caption.rawValue". Those who do not seem to work, so I think that it is not those specifically. Before I had the stated case, tfSignatureLine would have got "null Smith" as its value.

I think that there is something to the top with your resolveNode syntax. Not sure that it works properly with things like this.parent.parent, etc. But can someone feel free to correct me on this point.

I couldn't take a good look at your file, because it seems that you used fragments and you will need to incorporate into the document for others to see.

The following works:

If (! this.isNull &! tfLastName.isNull) {}

var name = this.rawValue + "" + tfLastName.rawValue;

tfSignature1.resolveNode("caption.value.#text").value = name;

}

But I never use resolveNode() like that, so am not sure of the syntax. I always use xfa.resolveNode () as:

xfa.resolveNode("Path.To.FieldName.caption.value.#text").value

You probably don't need references to 'parent' in your form. The best way to get the path to a field is to use the CTRL key, click on an object while you're in the Script Editor.

Tags: Adobe LiveCycle

Similar Questions

  • Change the display of text field value based on the value (short sample code provided)

    I read around on it for a few days, but I still can't get it works well.

    I have a field of text called "W1SnC1". In fact, I have several domains to execute it. That's why I tried to make the generic script below. Basically, I want to change the properties > form field to "visible but does not print ' if the text field contains ' - '. (As a note side '-' is the default value). I put the script in the following properties > validate > run the custom validation script:

    var elemName = event.target.name;

    If (event.value == '-')

    {

    elemName.display = display.noPrint;

    } else

    {

    elemName.display = display.visible;

    }

    Its odd but once in a while it works :-) I think I must be clicking on something that the queues of validation in these moments. However, I need some general help. Did someone mind giving advice on what to change?

    Try something like this:

    Event.Target.Display = event.value = "-"? display.noPrint: display.visible;

  • How do I change police inside the text fields of the form

    I went through tutorials on lynda.com and success exceeds my form.

    However I can't understand how a change of default Times Roman in form fields in a different typeface.

    I assigned followed by paragraph styles, object styles, but nothing happens. I also can't change the font color in the text fields.

    Anyone know how to change these attributes?

    You cannot change the default font to a form field in Indesign. You can change the font in Acrobat by changing the form > by selecting the field properties > appearance > fonts

  • to change the case of text field

    I want to change the case of a text field.

    I use

    _root.createEmptyMovieClip("myTextHolder",1);
    _root.myTextHolder.createTextField("myText",1,0,0,200,30);
    _root.myTextHolder.MyText.text = "this is a new text object";

    How to do?

    reply to your original message, and then view the code you used.

  • Changing the size of text fields

    Hello I am trying to get my text fields for the login and the password on the Web site, I'm working on shrink to a smaller size to fit the design of the Web site. So far I've been able to change the amount of characters the box appear in dreamweaver and not in the browser; what I want to do, is change the height, width and do so all can fit into a smaller area.

    CSS will make the case--

    input {do-family: comic - without, without serif; height: 14px; width: 60px banner ;}}

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "pmurchison" wrote in message
    News:f90buo$9tk$1@forums. Macromedia.com...
    > Hello I am trying to get my text fields for login and password
    > on the
    > Web site, I work on shrink to a smaller size to fit the design
    > of
    > Web site. So far I've been able to change the amount of
    > characters the
    > box in dreamweaver and not in the browser. what I want to do is
    > change
    > the height, width and are therefore all can fit into a smaller area.
    >

  • Change the number of text field

    I have an EditField where I put a text like 'Enter the Email' with the setText() method. If wen I need to replace this text in a real App d email identification, I need to delete that text using the button Delete and den type identification of email. I want somethng like that when I start to write in the edit field automatically deleted and not manually shud of text 'enter Email'

    Try this:

    http://supportforums.BlackBerry.com/T5/Java-development/prompt-hint-place-holder-text-on-a-numeric-P...

  • Text field for the (nieme second word) on the Page

    The script adds text fields on a page based on the search for the word DATE.

    This script must be changed to add the text field for second occurrence of the word DATE only on the page and NOT the first occurrence of the word.

    Currently, the script adds a text field for all occcurances of the word DATE.

    Any help will be greatly appreciated.

    Thank you.

    / * Add on manual transmission date text field * /.

    var this.numPages = NUMPAGES;

    for (var k = 0; k < numpages; k ++)

    / * 1st co - ord = Horizontal, 2nd co - ord = vertical, 3rd co - ord = width, 4th co - ord = height * /.

    {

    {

    numWords var = this.getPageNumWords (k);

    for (var i = 0; i < numWords; i ++)

    {

    var ckWord = this.getPageNthWord (k, i, true);

    If (ckWord = 'DATE')

    {

    var q = this.getPageNthWordQuads (k, i);

    Convert quads in the rotation by default user space

    Userspace used by links.

    m = (new Matrix2D).fromRotated(this,0);

    mInv = m.invert)

    r = mInv.transform (q)

    r = r.ToString)

    r = r.split(",");

    var f = this.addField ("Date", "text", k,

    ([r [0] * 1.10, r [1] - 10, r [2] * 1.3, [5] r-15]) ;

    }

    }

    }

    }

    Try something like this:

    var this.numPages = NUMPAGES;

    for (var k = 0; k)< numpages;="" k++)="">

    var nDateCount = 0;  Initialize counter

    numWords var = this.getPageNumWords (k);

    for (var i = 0; i)< numwords;="" i++)="">

    var ckWord = this.getPageNthWord (k, i, true);

    If (ckWord = 'DATE') {}

    nDateCount += 1;  Incrementing counter

    If (nDateCount == 2) {}

    var q = this.getPageNthWordQuads (k, i);

    var m = (new Matrix2D).fromRotated(this,0);

    mInv var = m.invert ();

    var r = mInv.transform (q).

    r = r.toString ();

    r = r.split(",");

    var f = this.addField ("Date", "text", k, [r [0] * 1.10, r [1] - 10, r [2] * 1.3, [5] r-15]);

    break;  No need to keep the current page search

    }

    }

    }

    }

  • InDesign CC: Text in editable text fields in the process of disappearance after export

    Hello

    I'm having a problem of text of text editable in endangered fields after you export the document as an interactive pdf. I created the text that should be editable in acrobat with InDesign CC. Thus, for example, I want to have a field editable text that said "I am Marie." I want users to have the ability to change from "Married" to "Tom" or "Ben" in Acrobat. So the pdf should have a form of editable text, saying the phrase "I am Mary" when users open the PDF in Acrobat. However, aafter export, the remains of fields of text, but the text itself "I am Mary." disappeared. I do not understand why this is happening because the text is there when you preview in the Preview SWF window in InDesign.

    Here it is the list of steps in my work.


    STEP 1: Create some texts (for example, m with the tool text frame in InDesign CC )


    STEP 2: Click with the right button on the image and click on "Interactive > convert to text field»

    OR

    STEP 2: Select the block of text, open the window "buttons and forms" and change the type as "text field"


    STEP 3:  Export the document as an interactive pdf. The parameter is set by default.


    Result: When I open the PDF in Acrobat, the text field is there, but it is empty.


    Please help me solve this problem. I know this is possible because a person in front of me in my work.

    Thank you!

    As far as I know, to have a form pre-filled text [I am Marie] appear in the text field, you must set the default value of the text field in Acrobat. You can do this by selecting the field property > Options > Default Value

  • Text field align bottom

    I am wanting to change the alignment of text fields of the above low alignment alignment.  When click with the right button on the field and choose styles > create a new style > text value formatting, I can change the vertical alignment.  But I can't do it for several areas at once. How can I change or apply a style to many areas?  The style editor is grayed out when I select several areas, but again when I'm in style with a selected field editor I see a button on the bottom that says "apply to the selection."

    Thank you

    You can do it from the paragraph palette.  If you don't see it, go to the Windows menu and select only the paragraph menu option and it should appear on the right side.  Select several fields, and then click the paragraph palette which indicates "align bottom."  It's at the top of the palette.

  • Why my dynamic text fields are not complete?

    For some reason are not filling most of my fields of dynamic text. The only new thing before it stopped working correctly, I added was a new button, but anyway... Whether or not I take the key, no text field is filling. It is on all the layers I have. If I change the font of text fields, they begin to fill in correctly... and when I do all the characters of the same type... they begin to fill not more!

    Embed your fonts

  • Change the label of text form field using javascript.

    Hi all, need your help.

    I have a field that will provide different information depending on the type of document.

    I would like to change the label of the field of javascript in da

    Thank you very much

    Andrei

    You can always set the page element and follow the following to refresh a specific region

    APEX Oracle report update the easy way & laquo; Warp11. ::. Group knowledge Oracle Apex

    Check the following for an option in jquery

    change the text on the label based on toggle? -jQuery Forum

    jQuery - label text change based on radio click - Stack Overflow

    Kind regards

    Vishal

    Oracle APEX 4.2 reports | Packt Publishing

    Vishal blog

  • Change the caption of a drop-down list field

    Hi all

    I'm changing the legend of some field drop-down under certain conditions. The following is written on some other field drop-down list:

    If (this.rawValue == 'Ad Hoc payments')

    {    

    xfa.resolveNode ("form. PaymentDetails.ddlInvoiceFrequency.caption #text ") .rawValue group"TEST CAPTION";

    }

    But it seems to not work.

    Any help would be much appreciated.

    Thank you

    Vijay.

    Try with this:

    delete the caption in the palette of the subject field and type this in the case of change:

    If (xfa.event.newText is "Ad Hoc payments") this.caption.value.text.value = "TEST CAPTION";

  • Web page open based on the value of the text field

    I want to open a web page that is based on the value of a text field.  How to bind the value of a text field to a command which will open the web page?

    For example, the value of the text field is: 8 t - EXT

    and the web page I want to open when you press a button is: http://hqms/doc.asp?dn=8T-EXT

    As you can see that the 8 t - EXT is something that a person enters the form and is what is needed to open the web page.  The other text in the link of the webpage is always the same.

    Thank you

    Hello

    In the click event of the button, place the following JavaScript code:

    if (TextField1.rawValue !== null) {
         var vURL = "http://hqms/doc.asp?dn=" + TextField1.rawValue;
         app.launchURL(vURL, true);
    }
    else {
         app.alert("Dear user, please put a code in the text field. Thank you!");
    }
    

    You need to change the object references based on your shape.

    Niall

  • fill in the text field with the caption for the radio list

    Hi, I'm looking for an answer to this all morning.  I need to use the value of a list of radio to populate a text field.  I can get the selected numeric value OK with

    $.rawValue = form1. #subform [0]. . Table3.Row1 #SubForm [0]. . RawValue location [0]

    but I want to get the text associated with the value element.  This could be the legend of the selected option button, since it is the same thing.  I don't want to use an if statement because I have a lot of forms to create and that would change things a few times in each shape.  How can I get the value of the text of the column of the item below?

    screenshot.17.png

    Try the following with two modifications to your hierarchy.

    (1) currently, you do not have a name for Page1. Make sure that you assign a name for ease of use. ("Page1").

    (2) define a name for the subform that contains PeriodRadio. ("Subform1").

    $.rawValue = form1. Page1. Table3.row2. Subform1. PeriodRadio.selectedMember (). caption.value.text.value;

    Thank you

    Srini

  • Change the text displayed, based on the threshold value

    Hi users of Labview,.

    I need help with display and editing text in labview.

    The text should display and change according to the following conditions:

    0 volt - "no power".

    1 volt - "controller ON".

    2 Volt - "Rotor Running"

    3 volt - "Rotor stopped".

    Based on the voltage read by the channel, the text must be displayed and modified on the same area of the front panel. For example, initially it will be 0 Volt and the text "No power" should appear as an indicator of text (and not as a warning message). He needs to change ' controller we ' when the chages of voltage from 0 to 1 volt. The canal reads the analog input voltage (range 0 - 5V).

    I'm relatively new to labview. So please give me pointers or from suggestions on how can be done. Any help is greatly appreciated.

    Thank you

    REDA

    Hello

    Thanks for the crossrulz of notes, have not used the front threshold.  For this simple example, it is "symmetrical", but I can see how the values in the table have been does not correspond to the index position that is so true useful.  Learn something every day, I could not resist, wanted to try.

    OK, here's a sample VI that puts a custom message based on the crossing of a threshold.  Home work is to study the components before asking to :-)

    The dice are the analog signal of 0 to 6.   He rounded to the whole number to provide the index number.  Power is the index number in the index table, the table being hard-coded text messages.

    Two additional indicators may be deleted, useful to see what is happening.

    And get rid of the value 0 if you want the text to match the number, he he he

    Enjoy.

Maybe you are looking for