Behavior:  Set Text of Text Field

I have an onclick event that sets the value of a form element
to "Hi there" using the Set Text of Text Field behavior. Works
great. The reference book I have says you can also place valid
JavaScript code in the box that appears by placing it in brackets {
}. Anyone done this?
What I am trying to do is to set the value of field2 to the
value of field1 by using code like this:
{document.form1.field2.value = document.form1.field1.value}
Of course, can't get it to work

Something like this
<input type="text" name="field1"
onchange="this.form.field2.value=this.value" />
<input type="text" name="field2" />
This will update field2 to field1's value when you tab out of
the field - or
you can alter onchange to onkeyup to have field2 updated as
you type into
field1
Cheers,
Jon
"DreamerJim" <[email protected]> wrote in
message
news:gioo4k$cmb$[email protected]..
>I have an onclick event that sets the value of a form
element to "Hi there"
> using the Set Text of Text Field behavior. Works great.
The reference
> book I
> have says you can also place valid JavaScript code in
the box that appears
> by
> placing it in brackets { }. Anyone done this?
>
> What I am trying to do is to set the value of field2 to
the value of
> field1 by
> using code like this:
>
> {document.form1.field2.value =
document.form1.field1.value}
>
> Of course, can't get it to work
>

Similar Messages

  • Behaviour: "Set Text of Text Filed"

    I am attempting to apply the behaviour "Set Text of Text
    Filed" to a radio button pair (the NO of Yes, NO) in order to fill
    in a text field with "skip to question 4"
    However, when attempting to apply, I get an error message "no
    ID. Set ID in the Property Inspector. I also not that while the
    form text fields all have names (eg., "name", "street", etc.) The
    "Set Text of Text Filed" behaviour windows shows them as "input
    <unidentified> why?
    The radio button name in the property inspector is "radio"
    and the checked value is "yesno". I see no other fields on the
    property inspector to apply an ID. I have even encapsulated the
    "NO" radio button in a "DIV" tage with a ID=NO. But it also does
    not show up in the "Set Text of Text Filed" behaviour window. Still
    shows them as "input <unidentified>. Why?
    Can anyone advise what I am doing wrong?
    The "set text of container" and the "set text of status bar"
    behaviours work just fine.
    CarverW

    > why?
    Because this behavior requires you to select elements with an
    ID assigned,
    not just a name (I am referring to the TARGET of the
    behavior, not the
    trigger).
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "CarverW" <[email protected]> wrote in
    message
    news:fldsdh$q60$[email protected]..
    >I am attempting to apply the behaviour "Set Text of Text
    Filed" to a radio
    > button pair (the NO of Yes, NO) in order to fill in a
    text field with
    > "skip to
    > question 4"
    > However, when attempting to apply, I get an error
    message "no ID. Set ID
    > in
    > the Property Inspector. I also not that while the form
    text fields all
    > have
    > names (eg., "name", "street", etc.) The "Set Text of
    Text Filed" behaviour
    > windows shows them as "input <unidentified> why?
    >
    > The radio button name in the property inspector is
    "radio" and the
    > checked
    > value is "yesno". I see no other fields on the property
    inspector to apply
    > an
    > ID. I have even encapsulated the "NO" radio button in a
    "DIV" tage with a
    > ID=NO. But it also does not show up in the "Set Text of
    Text Filed"
    > behaviour
    > window. Still shows them as "input <unidentified>.
    Why?
    >
    > Can anyone advise what I am doing wrong?
    >
    > The "set text of container" and the "set text of status
    bar" behaviours
    > work
    > just fine.
    >
    > CarverW
    >

  • Using numberd buttons to enter text into a field

    Hi all, was wondering if I had 10 seperate sprites acting as
    buttons on a page, which will be numbered 0 -9, is it possible to
    use them to enter text into a field. e.g.
    If the user presses the sprite with a number 1 on it, would
    it be possible to have a 1 displayed in an edit field. I need to
    pretend as though im using a remote.
    thanks

    You can create a behavior that will allow you to set a
    variable for each
    button. When you assign the behavior to your button sprite,
    it'll
    prompt you to enter the ButtonNumber property. Haven't tested
    this yet,
    but something like this should work:
    global gNumberEntered
    property ButtonNumber
    on getPropertyDescriptionList
    description = [:]
    addprop description, #ButtonNumber, [#comment:"Enter number
    to assign
    to this button", #format:#integer, #range:[1,10], #default:
    1]
    return description
    end getPropertyDescriptionList
    on mouseup
    sprite(the currentSpriteNum).member = member("buttonOver")
    gNumberEntered = ButtonNumber
    cursor -1
    end
    on mouseEnter me
    sprite(the currentSpriteNum).member = member("buttonOver")
    cursor 280
    end
    on mouseDown me
    sprite(the currentSpriteNum).member = member("buttonDown")
    end
    on mouseLeave me
    sprite(the currentSpriteNum).member = member("buttonUp")
    cursor -1
    end

  • How can I have text from multiple fields on one layer, copy to one field on another layer?

    A little help please as it's been years since I've done any coding of any sort.
    So I have a 4 page document with various field types.  I have a document script that gets "TodaysDate" that works perfectly and a few other scripts as well.
    So what I'm trying to do is find a work around for the following:
    I have 3 fields - SURNAME, FIRSTNAME & dob.
    And I want what is typed into these fields to populate into 1 field.  And according to this tutorial (http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript) it's not exactly possible.  At least I think that's what it says.
    However I'm hoping that maybe I could have a Submit button at the end of that document that when clicked would copy the text from those 3 fields (that I would have on 1 layer) into 1 field on a 2nd layer.  Is that even possible??
    I'd also like to have the document Print, Save (using the text in the field on the 2nd layer as the file name), Email (using the text in the field on the 2nd layer as the subject line) and Export to a specific Excel spreadsheet. 
    I don't want much do I?
    I'm using Acrobat 9 Pro on a Windows PC but also have access to Acrobat 8 Professional.  And I'm going to want the form to run in Acrobat Reader X.
    So far I have for the 3 fields into 1 on another layer:
    function buttonClick(){
    if(buttonClick==false)
    event.value=this.getField("SURNAME"+"-"+"FIRSTNAME"+"-"+"dob").valueAsString;
    But I have no idea how to call the event.value from 1 layer to another or if any of that code above would even work at all.
    I have a script that I believe will work perfectly for the Save and Email function:
    Using the “doc.submitForm()” function
    // This is the form return e-mail. Its hardcoded
    // so that the form is always returned to the same address
    // Change address on your form
    var cToAddr = "[email protected]";
    // First, get the client CC e-mail address
    var cCCAddr = this.getField("ClientEmail").value;
    // Now get the beneficiary e-mail only if it is filled out
    var cBenAddr = this.getField("BennyEmail").value;
    if(cBenAddr != "") cCCAddr += ";" + cBenAddr;
    // Set the subject and body text for the e-mail message
    var cSubLine = "Form X-1 returned from client"; var cBody = "Thank you for submitting your form.\n" + "Save the mail attachment for your own records";
    //** Send the form data as an XML attachment on an e-mail
    // Build the e-mail URL
    var cEmailURL = "mailto:[email protected]?cc=" + cCCAddr + "&subject=" + cSubLine + "&body=" + cBody;
    this.submitForm({
                cURL: cEmailURL,
                cSubmitAs:"XML",
                cCharSet:"utf-8"
    I'll work out the Export to Excel thing later as I've seen many tutorials on that.  But can I do the 3 fields to 1 thing at all?
    Please Help!!!

    Sorry Gilad.  I hope I'm not getting on your nerves (too much) but as I said it's been a while since I did any formal code. And I'm trying to do this code for a work document but I'm doing it in amongst so many other things I do for my job that it's difficult to get the time to concentrate for longer than 5 mins.
    I didn't get a chance to try that code until just now.  I guess I asked again as I thought (from what I'd read) that it wouldn't be that simple.
    So I've added that code and I get no errors.  But it doesn't appear to be doing anything either.  I've added the code like this in the Custom calculation script of a separate field I've called FileName.  And on the Button i'm using I've added:  buttonClick()
    function buttonClick(){
    if(buttonClick==false)
              event.value=this.getField("SURNAME").valueAsString + "-" + this.getField("FIRSTNAME").valueAsString + "-" + this.getField("dob").valueAsString;
    So now I'm guessing that becasue i'm not getting an error or a result that I've screwed it up still.  Have I put the code in the correct area?  Have I assigned a the buttonClick() function correctly?

  • Wrapping of the text in form field text box

    Hi,
    We are using adobe acrobat x pro 10.1.0 licensed versions
    Issue
    In a pdf file we have text boxes (Form fields), we are populating it dynamically,We have the issue in wrapping of the text
    I had set multi line property (in a line we can accommodate 39 characters, total there are 49 characters)
    The last character is getting displayed half, Please find the issue as in line image
    Requirement
    We need to wrap the text and display it correctly, please find the requirement as inline image
    Please let me know your valuable suggestions
    Regards,
    S.N.Prasad

    You'll want to ask in the Acrobat forum: http://forums.adobe.com/community/acrobat/acrobat_windows

  • Auto populate text fields with a trigger such as entering text into input fields in ADF

    Hello all,
    I am not able to auto populate text fields with a trigger such as entering text into input fields in ADF.
    I tried AdfFacesContext.getCurrentInstance().addPartialTarget(val); in the back end using setter method of input text field.
    its not working ..
    is there any way to achieve it
    Regards,
    Shakir

    Hi,
    Always mention your JDev version.
    The valueChangeListener would fire only when you set the autoSubmit property of the field to true. Can you elaborate your requirement? What do you mean by related data? Are you performing some sort of search?
    If you want to get the value you entered on the field, just set autoSubmit to true and get the new value from the valueChangeListener. If your requirement is something like as and when you type, do something, you need to check out this approach :https://blogs.oracle.com/groundside/entry/auto_reduce_search_sample
    -Arun

  • Inserting text into a field at the current cursor position

    Does anyone know how to insert text into a field at the current cursor position? I would like it to work similar to the Syntax Palette in Forms. I cannot figure out how to retrieve the current cursor position in order to manipulate the text.
    Any help would be great.
    Thanks.

    Hi,
    If the button and the textfield are on in the same subform then this code should work in the click event of the button
    (This is JavaScript code so make sure the code is set to JavaScript and Client on the drop downs in the script window)
    (assuming the name of the textfield is TextField1)
    TextField1.rawValue = "some value";
    If they are in different subforms then you have 2 options
    Please note in both these options it is easier if the subforms have names ( I am assuming this to keep samples simple)
    option 1 -
    use the parent object to move up the tree till you are at the same level as that of the subform that contains the textfield
    e.g. 
    (Click Event of the button)
    this.parent.subformname.TextField1.rawValue = "some value";
    option 2 -
    Use the resolve node to make your way down from the top level of the form
    xfa.resolveNode ("form1.subformname.TextField1").rawValue = "some value";
    Hope this helps
    Malcolm
    p.s. I am making assumptions as the image/file you attached did not appear for me.

  • Need help - script to continue text in another field if necessary

    Wish I could attach my form but it's not available. I am using Adobe Acrobat 9.0. I have a form with two text fields for "Other" information that needs to be shared. If the user types in more characters than the box holds the overflow text doesn't print. These are court documents and all the text has to print somehow. I am trying to figure out a work around for this and wondered if a script can be written to put the extra text from each "Other" field into another field that would open on a new page at the end of the document if necessary. I want to avoid having extra empty pages however so if they can be added ONLY if the text needs to overflow. I hope I explained this okay, like I said I wanted to upload the form but can't. If someone can help me with this I would really appreciate it.

    LiveCycle is a part of Acrobat Pro Extended - Windows users only, not Mac.
    OctRita wrote:
    … would it be possible to have a page at the end with a text field for each of the ones that need overflow to print and can a javascript be written to put the extra text into those fields?
    Yes, it is possible - I've already indirectly provided you with the code for that via the link in my post. Just remember to save it to your desktop:
    http://www.adirect.dk/adobeforum/commentfields.pdf
    As an alternative you could remove the limited characters, set the field to multiline and make a script that set the textsize to auto if the user fills the field with text. When textsize is set to auto, the text will keep on shrinking as user types more text.
    Torben.

  • Hyperlinking text in form fields

    I'm using Acrobat 9 Pro and filling out a form that was supplied to me in PDF format. I don't say anyway to hyperlink words (in form fields) in Acrobat Pro. Is it not possible?

    Yes, you can do that if you set up the text field to allow Rich Text formatting. To create a hyperlink, select some text, right-click, and select "Hyperlink".

  • How to make the text of the field to mixed case of the transaction COMMPR01

    Hi,
    There is a text description field in the COMMPR01 for a product.
    Now when i entered any text into the field, it is changed to UPPER CASE.But i want that when i enter any text , it will save the text as it is that means in both upper case and lower case.
    Suppose i entered a text as  Dummy Text, then when i save this product this text should display as Dummy Text.It should not display as DUMMY TEXT.
    Please suggest me how to do this .
    Thanks and Regards,
    Sudhansu

    I just verified and the Description for Products (and possibly other objects too) are stored in table COMM_PRSHTEXT.
    The relevant Data element is COMT_PRSHTEXTX which has the domain PRSHTEXT40.
    If you look at this domain you have a parameter "lowercase" which is available as a flag option.
    <u><b>The explanation about this Flag is the following:</b></u>
    Lowercase letters allowed/not allowed
    If this flag is set, upper case and lower case are distinguished when you enter values with screen masks.
    Otherwise all the letters entered will be converted to upper case when you enter values with a screen mask.
    This mechansim is in effect for all the fields referring to this domain.
    <b>Solution would be</b> to verify if for this data-element the same Domain is used.
    If yes, you can flag this option in the domain.
    this should solve your problem.
    kind regards
    davy pelssers
    please reward if helpful.

  • Need to chg text of a field in SM30: Compare Flag

    Hi,
    I created a table & created a table maintance Generator.
    I want to change the text of a field in SM30. Currently it is taking from Dictonary Field text.
    I went to SE11->Table Maintance Generator-> Modification->Maintance Screen->Flow Logic
    There i changed the text of the field, saved & activated.
    When i press the back button, a pop-up box appear "Modify the compare flag if a screen changes".
    Please assist me in fixing this
    Thanks & Regards
    Suresh Kumar

    Hello Suresh,
    The pop-up comes due to an inconsistent settings maintained in SE54. There is a flag called 'Compare Flag', which I am assuming, has been set to Automatically Adjustable in SE54.
    But beyond this, you have manually adjusted the screen parameters, which contradict with the Compare flag settings.
    Goto SE54, and change the flag to Adjustable in Dialog and save the SE54.
    The pop-up should be eliminated.
    Regards,
    Rekha

  • Autosubmit in input text changing other fields

    Hi,
    I have an af:inputText set to autosubmit. When it gets called it is changing the value of an already set selectonechoice to null. This is causing some major issues in usability. Is this normal behavior? I am using JDeveloper 11.1.1.6
    Here is what my page has:
    <af:selectOneRadio label="#{makepaymentviewcontrollerBundle.XX}"
    requiredMessageDetail="#{makepaymentviewcontrollerBundle.YY}"
    id="sor1" showRequired="true"
    required="true" layout="horizontal"
    autoSubmit="true" immediate="true"
    binding="backingBeanScope.YY.sor1"
    value="#{backingBeanScope.YY.paymentMethod}">
    <af:selectItem label="11" value="11" id="si2"/>
    <af:selectItem label="22" value="22" disabled="true"
    id="si1"/>
    </af:selectOneRadio>
    and
    <af:inputText label="#{makepaymentviewcontrollerBundle.11}"
    id="it4"
    validator="#{backingBeanScope.YY.it4_validator}"
    required="true"
    value="#{backingBeanScope.YY.line1}"
    autoSubmit="true" immediate="true" columns="28">
    Is there anyway to avoid the behavior that the input text is changing the values of the radio button in the managed bean ?
    Edited by: 919315 on Mar 16, 2012 12:11 AM
    Edited by: 919315 on Mar 16, 2012 12:14 AM

    The problem seems to be that you have the value for the radio button bound to backing bean scope. The docs say this about backing bean scope:
    backingBeanScope: Used for managed beans for page fragments and
    declarative components only. The object is available for the duration between the
    time an HTTP request is sent until a response is sent back to the client. This scope
    is needed because there may be more than one page fragment or declarative
    component on a page, and to avoid collisions between values, any values must be
    kept in separate scope instances. Use backingBeanScope scope for any
    managed bean created for a page fragment or declarative component.Backing bean scope (and request scope) beans lose their state in between requests.
    John

  • SharePoint 2010 List - Append Changes to Existing Text - multiline text fields being duplicated

    Hello!
    SharePoint 2010 - I have this same problem for all Lists that use the combination of 1) Multi-line text column; 2) Column is set to "Append Changes to existing text"; 3) Text choice = Plain Text or Rich Text or Enhanced Rich Text. 4) List item is modified
    in datasheet view
    Each time a list item is modified in datasheet view, if the multi-line text column is left blank it will have it's previous value duplicated. For example - If I'm updating a list item in Datasheet View and updating a column other than this column
    I described above, each time I make an update to the list item the previous value/comment left by someone else in that column will be duplicated with my name attached along with the date.
    Why is SharePoint duplicating the contents of this field??
    Example:
    Comments (multiline text column): Comment 1
    Miguel Patey 10/3/2011 2:12 PM
    Comments (multiline text column): Comment 1
    Miguel Patey 10/3/2011 2:10 PM
    Comments (multiline text column): Comment 1
    George Pully 10/1/2011 8:45 AM
    In my testing I noticed that a list item that is modified in standard view (not datasheet view) will not duplicate the value of the Comments field if left empty. Once the item has been modified in standard view I can make changes to that list item in datasheet
    view and the Comments field won't be duplicated...
    Any ideas?
    Michael Reinhardt

    I think I have identified exactly when/how this happens. It was happening to us, I found this post, and then I did further testing based on your note that it only happens when using datasheet. Thanks so much for that lead!
    In my example below, "status note" is the column where we use MLT w/ append comments. Here's what I found in my testing:
    If I used datasheet to edit an item, and the LAST edit made to that item did not include a status note, then no duplicate status note was created when I made my edit.
    IF, however, the last edit made to the item DID include a status note, my edit (no matter WHAT I was changing, no matter if the view included the status note column or not) created a duplicate of the previous status note.
    Try it out and see if that works the same for you. You can even tell easily if you show the column in the datasheet view. If, when you go to make your edit you see content in that column, you know your edit will include a duplicate of that MLT content. If
    you see it is blank (meaning that last time someone made an edit they did not change that MLT column), your edit should be fine and create no duplicate.
    PS- editing in the editform creates no problem whatsoever. The problem definitely seems specific to the way Datasheet handles edits.

  • Copy text from multiple fields to one field

    I would like to copy text from multiple fields into one field. Each of these smaller fields will only be allowed to have one character. The larger field will not be able to be edited.
    So far, I have thought of creating a naming heirarchy for these fields. I was going to then call upon the array of the parent and set the value of the parent to equal this array.
    var parent = this.getField("everything");
    var array = everything.getArray();
    var v;
    for(parent=0; parent<array.length; parent++)
    v = a + " " + v;               //Im guessing this line is incorrect
    parent.value = a;
    Any suggestions? or a better way of doing this.
    Thanks

    The code sample you provided is using AcroForm scripting and will not work in this form. There is another post similar to this one...have a look at this one it might help you out. It is doing the opposite of what you want but the concept of the loop and how each field is addressed inside ofthe loop is what you wil need.
    http://forums.adobe.com/message/2954517#2954517
    Paul

  • Display Image(which set as behind text)   based on some condition.

    hi all
    I have developed a xml report and in that rtf am displaying a static image (which is set as behin text).
    But i need to display the image based on some condition
    for example i have a field as ORG_ID
    if org_id=87 then image should display for that purpose am planning to use <?if:ORG_ID=87?> condition but where to place this condition for the image.
    kindly help me
    thanks for all in advance.

    that too not working because
    on image am displaying some other fields.
    see i think you didn't get my point.
    in my out put page am displaying item details ,quantity,and cost and customer details just like invoice copy .
    behind this data am displaying my company logo which will capture whole page size..
    if i place the image in table then fields will be automatically in table so i cant restrict image in this way.
    Kindly suggest any other way that works only for image which is behind text. i mean condition should be applicable only for image and leaving all other fileds in rtf.
    or
    help on this how to set a dynamic image as behind the text.
    Edited by: maddy on Nov 28, 2012 7:32 AM
    Edited by: maddy on Nov 28, 2012 7:35 AM

Maybe you are looking for

  • Start Navigation sound in Windows 7 64 bit dissappeared

    ? [size="">I have been scratching my head over this one. [size="">After doing a clean install of Windows 7 64 bit on a new build this week, and installing a new X-Fi PCIe Titanium Fatality Pro, I found the start navigation windows sound was no longer

  • Reading a text file from a URL

    I am having problems trying to read a text file from a URL. This is the code i have been using: package Java; import java.net.*; import java.io.*; public class Main_1 { public static void main(String[] args) throws Exception {      URL myAddress = ne

  • Activity type deletion

    Hi, Can somebody tell me how to delete and Activity type in the CO module. Thank you Sony

  • Sql.exception using jdbc:odbc Sqlserver 7

    hi i use java jdk 1.3 and sqlserver 7.0 on windows98 and establish a connection over jbc:odbc. I use executeUpdate() statement and insert something to a table. there is a trigger defined and sometimes i got an sql.exception, that no rowcount returned

  • Invalid verson error installing EM 10202 to 11G DB version as repository

    I am trying to install 10202 em with -noconfig option to a existing db. Then I plan on installing the 10204 patch and finish the install. My db version is 11.1.0.6 which certify says is supported with EM 10204. ERROR MESSAGE IS: SEVERE: Invalid versi