'Inserting' text into a Text Field on event trigger in a static form

Sorry if this seems like a silly question, but I've been struggling with it for a bit and I'm new to Adobe/JavaScript.
I am building a static form (it must be static), and I want to have text appear/disapear based on an event trigger (mouseclick). I tried creating a floating text object inside of a static text object, but I'm not sure how I can make the string value for this change based on the event trigger. The only advice in the Adobe help was purely regarding FormCalc, which I can't use as this must be a static form. I tried using this code in the <script>, but it obviously didn't work as it was written from FormCalc code versus JaveScript;
TextField.rawvalue = variable.value;
What do you suggest in terms of being able to script this, so my static form will work? Thanks a billion if you can help!
PS: I'm using Adobe 9, LiveCycle ES 8.2
PPS: Also tried inserting the following into my trigger script;
                    xfa.resolveNode("form1.subform.TestField").rawValue= "Please Work";
                    xfa.layout.relayout("form1.subform.TestField");
It also did not work.

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.

Similar Messages

  • 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

  • My DW CC latest version does not show me the text field option when trying to make a form!!! P

    So when I youtube the same version as mine it still show to other users the text field option but on my insert panel under forms it does not give me the option
    PLEASE HELP

    Hi Taatueeyy,
    As this sound weird issue, I'll suggest you to clear preferences and then try launching.
    How to clean preferences, please check the below link
    http://forums.adobe.com/thread/494811
    If this doesn't resolve your problem. please reveret.

  • Inserting data into a CLOB Field

    I am trying to insert a 100,000+ byte string into a CLOB field in Oracle, but I'm getting a "string literal too long" error. I am using Visual Basic and ADO to try to accomplish this. My insert statement is:
    sql = "INSERT INTO IMAGE_VERSION " & _
    "(field1, field2, field3)" & _
    "VALUES('" & strNm & "', '" & strDt & "', '" & strData & "')"
    Field 3 is defined as a CLOB in the database. From what I understand, the CLOB can hold massive amounts of data.
    Can anyone lend a hand?

    Re: OTN Downloads

  • Cfpdfform (CF8) changes text-field font of an adobe 9 pdf form to Courier

    I'm having problems getting cfpdfform to render the text-field font as it exists in the source pdf form.
    The source pdf form was created in Acrobat 9 Standard.
    When I download the pdf from the server using cfcontent, the text-fields look as expected, retaining their designated font (and the pdf has the desired fonts embedded).
    However, when I do a cfpdfform action="populate", the text-field font is switched with Courier (even though the desired fonts remain embedded).
    This happens regardless of what font I pick.
    I have verified that the font exists on the server and in cf admin.
    Here's my code:
    <!--- populate --->
    <cfpdfform action="populate"
               source="#pdfPathFile#"
               destination = "#pdfPathFile#"
               overwrite = "yes">
        <cfpdfformparam name="student_name" value="first name and last name" />
        <cfpdfformparam name="certificate_title" value="a cool certificate title" />
        <cfpdfformparam name="certificate_date" value="1/1/2010" />
    </cfpdfform>
    <!--- make read-only --->
    <cfpdf action = "write"
           destination = "#pdfPathFile#"
           source = "#pdfPathFile#"
           flatten = "yes"
           overwrite = "yes"  />
    <!--- return the content --->
    <cfcontent
        file = "#pdfPathFile#"
        deleteFile = "yes"
        reset = "yes"
        type = "application/pdf" />
    Commenting out the cfpdf action = "write" block produced the same outcome.
    Using different source and destination filenames (vs overwriting  existing one) didn't make a difference, either.
    Any ideas on how I can get cfpdfform to respect my predefined text-field fonts?
    I truly appreciate your time.

    The problem was resolved.
    Turned out to be the way the pdf was created by Adobe 9 Standard that made cfpdfform misbehave.
    Three things we did seemed to have made the pdf acceptable by cfpdfform:
    1. Downloaded the latest updates for Adobe 9 Standard
    2. Checked on the text-field "Multi-line" property
    3. Checked off the text-field "Rich Text Formatting" property
    Cheers.

  • Selecting just text fields throughout the entire document when editing forms in Acrobat Pro XI

    I edit PDF's all day and it is seriously time consuming to edit the properties of text fields when you can only select a few at a time due to other elements (checkboxes, radio buttons etc.) prohibiting you from simply "Selecting All" elements and editing them all at once. I do not want to change the Appearance properties of all elements, just all of one type throughout the document. Is there a way to do this?
    Long story short I would like to just edit all text fields at once, then all checkboxes at once etc.
    Thanks for you time!
    Sean

    In the form edit mode, one can order the display of the fields by "name" or "tab order".
    If I sort the fields by name order and then use the control key and left mouse button, I can select various field names and the right mouse click brings up the context menu and I can then select the "Properties" option and I now have the 5 tabs for the common properties for the selected fields. I believe using the control key and the left mouse button is the usual method for selecting specific items in a  window listing.

  • Insert timestamp into a Date field.

    Hi anyone knows if I insert a timestamp into a date field, will it sort according to the date field if I use an sql statement to sort the data?

    Your question is quite unclear, it sounds like you have two questions:
    1. Can I insert a timestamp into a date field (in the database?)?
    2. Can I sort my sql statement using the date field?
    Is this what you are asking? If not, please clarify.

  • How to insert Date into a database field ?

    Hi,
    There is a field in a table with type = Date/Time,
    This is today's date:
    Date today = new Date( );
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    String today_string = formatter.format(today);
    Then, I try to insert this today_string into that field, but failed. Also try different ways with no luck. Anybody knows the trick ?
    Thanks in advance !
    Philip

    Create an insert statement in a PreparedStatement and use the setTimestamp method to fill in the current date and time. Search the JDBC forum for more details, this has been asked several times before.

  • How do you auto populate a date in a different text field after someone digitally signs the PDF form?

    I am trying to auto populate a date in a text box on the upper right hand corner of my document after someone digitally signs it. Is this possible? How do you do this?

    Go to the Properties of the Digital Signature field and under the Signed tab enter this JS code, under the last option:
    this.getField("SignDate").value = util.printd("mm/dd/yyyy", new Date());
    this.getField("SignDate").defaultValue =this.getField("SignDate").valueAsString;
    Of course, you can adjust the field name and the date format used in the script above.

  • Problem with Refreshing the data bound text fields

    Folks,
    First of all, this a GREAT product and I am moving my apps from Eclipse to Studio Creator. I am very impessed with it so far.
    I am gone through most tutorials, but can't help resolve the problem that I am having. I have a page, that lists all the users in a table. When you click on any user, it opens up another page that lists the detail of the specific user you have clicked on. This a typical use in most web applications, right?
    In the user detail page, I open it in "Read" only mode, by setting the "setReadOnly" to true for all text field components. Then users can edit it by clicking "Edit" button. Edit button just changes the "setReadOnly" to false, to allow editing. After editing, they can hit the "Save" button to save the changes. In the save button, I call this code:
    public void prerender() {
            try {
                userID=getSessionBean1().getUserID();
                getSessionBean1().getWeb_userRowSetUserDetail().setObject(1,userID);
                getWeb_userDataProviderUserDetail().refresh();
                info("prerender: Refresh called");
            } catch (Exception ex) {
                error("Error in userForm.prerender():"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.prerender():", ex);
            setReadWrite();
    public String btnSave_action() {
            try {
                getWeb_userDataProviderUserDetail().commitChanges();
                getWeb_userDataProviderUserDetail().refresh();
                info("Data Provider Refreshed in SAVE");
                _readOnly=true;
                form1.discardSubmittedValues("saveVForm");
                info("User Updated New:"+userID);
            } catch (Exception ex) {
                log("Error Description", ex);
            return null;
        public String btnEdit_action() {
            try {
                _readOnly=false;
                //info("User ID Edt="+getSessionBean1().getUserID());
            } catch (Exception ex) {
                error("Error in userForm.btnEdit_action:"+ex.getMessage()+ex.getStackTrace());
                log("Error in userForm.btnEdit_action():", ex);
            return null;
        private void setReadWrite(){
            // Set read-only to true or false for all text fiels
            this.btnEdit.setVisible(_readOnly);
            this.btnSave.setVisible(!_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_email_client.setReadOnly(_readOnly);
            this.user_email_office.setReadOnly(_readOnly);
            this.user_fname.setReadOnly(_readOnly);
            this.user_lname.setReadOnly(_readOnly);
            this.user_id.setReadOnly(_readOnly);
            this.user_password.setReadOnly(_readOnly);
            this.user_password_conf.setReadOnly(_readOnly);
            this.user_phone_cell.setReadOnly(_readOnly);
            this.user_phone_cell_aac.setReadOnly(_readOnly);
            this.user_phone_client.setReadOnly(_readOnly);
            this.user_phone_home.setReadOnly(_readOnly);
            this.user_phone_office.setReadOnly(_readOnly);
        }When the save button is clicked, the database is updated (as I can verify by looking directly into the database), but the data-bound text fields do not display the new value. YES, I am calling refresh() on data provider? I tried to call refresh in both "preRender()" and "Save" button action event, but that did not help either.
    Please note that the save button also changes the "setReadOnly" back to TRUE for all text fields. That means, users view the page in Read-Only mode after saving. (They have to click on "Edit" button again to edit it). I discovered that if I do not set the text field components in "ReadOnly" mode, then they display the updated value of the fields. But if I change setReadOnly to TRUE, then they display the old values (before the save).
    Any idea what I am doing wrong here?
    Thanks

    Here is my experience with it. I have three text
    boxes to be filled out. They are part of a virtual
    form with an add button as the submit. You can fill
    out the 3 and add them and a node is added to a tree
    component. When you click on a node in the tree
    component (the submit to another virtual form that
    the 3 buttons participate in) the text fields should
    be loaded with the values that they where added with.Hard to tell from this explanation, but if the text fields do not participate in a virtual form, then they are not going to get updated when an action in the virtual form happens. Not sure this is your problem. Like I say, hard to tell from this explanation.
    They will not display the values though...having
    nothing to do with read only. If I disable them
    before hand...they display the updated values. If I
    set their value at the top or bottom of prerender,
    they display the change...if I set the value in an if
    conditional that is hit (I have checked many times)
    in prerender, they will not display the values. If I
    set them in the tree handler anywhere, they will not
    display the values. This is very frustrating and is
    wasting tons of my time...I simply want to load the
    text fields based on the tree node that was
    clicked...I have messed with this for hours and it
    certainly does not work.Well, setting them in the tree handler won't work because the tree handler gets called in the page instance that handles the submit and not the page instance that renders the response.
    Posting your prerender code might help. Also, your action handler.
    >
    >
    - Mark

  • Why does text field in InfoPath 2010 show user name with two commas between first name and last?

    Here's the problem. I have a text field called Manager in an InfoPath 2010 form that is getting populated by a drop down field called
    Business Unit.
    The Business Unit drop-down field is pulling information from
    column A in a custom list via a managed data connection. The custom List has two columns:
    Title & Manager. 
    The Manager column in the custom list is a 'Person or Group' type column.
    The Data Connection pulls both the Title, Manager
    (and ID) data.
    There is a rule on the Business Unit drop-down field to change the value of the
    Manager text field with the Manager data on the custom list. The rule pulls the
    Manager information and filters the value to match the
    Business Unit on the Data Connection with the Business Unit drop-down
    field value (Main).
    The Business Unit drop-down field works great and pulls the value from the custom list, and the rule populates the Manager text field. The problem is that Manager text field shows the name as such:
    [smith,, john]. Notice the two commas between the last and first name. There should only be
    one comma!
    Anyone have an idea why the text field is appearing with two commas?
    Arnel

    Hi all,
    I have a workaround for this. I have an InfoPath 2010 form pulling data from a SP2010 list. The user chooses a System (Business Unit) from the dropdown list and that choice auto populates the associated user (Manager) for that system. I had to
    use concatenation, substring before and substring after to display the correct data.
    concat(substring-before(DisplayName, ",, "), ", ", substring-after(DisplayName, ",, "))
    DisplayName is the original data for the field. I am able to cut & paste this field into the formula. Therefore, I added a few spaces to separate it from the actually formula for future use.
    Select Insert Function
    Select concat
    Select the first link to double-click to insert field
    and then select Insert Function
    Select the Text category and choose substring-before
    Select the third link to double-click to insert field
    and then select Insert Function
    Select the Text category and choose substring-after
    Copy and paste your fieldname (in my case DisplayName) in the
    double-click to insert field
    parts of the substring-before and substring-after links.
    Delete the middle double-click to insert field link
    Add quotes, spaces and commas so that they match the following format:
    concat(substring-before(DisplayName, ",, "), ", ", substring-after(DisplayName,
    Translation:
    concat(substring-before(Doe,, John, ",, "), ", ", substring-after(Doe,,
    John, ",, "))
    Bring together all of the text before ",," (i.e. Doe) with ", " (comma, space) and all text after ",," (i.e. John).
    It should return
    Doe, John.
    I hope this makes sense. I have these instructions with screenshots if you need them, contact me.

  • Populate Text fields from Select List

    I have a select list when selected should populate two text fields with values based on SQL Query
    Eg. The select list is for empno and populates ename and sal in two different text fields.
    I have looked at Denes' example http://htmldb.oracle.com/pls/otn/f?p=31517:42 It is very good but the only problem I am facing is how to populate more than one fields.
    Any help will be appreciated.
    ZRH

    Hi
    That would depend on where the SAL data is. If it's on your page, then you could probably do something with javascript. If not, you would have to do some Ajax to retrieve the value from the database. Have a look at: http://htmldb.oracle.com/pls/otn/f?p=31517:80
    Your select list could include both the ENAME and SAL values and your existing javascript would then just split the data into two parts and insert them into the appropriate fields.
    Andy

  • How do i detect am empty text field condition?

    Hi im a newbie with swing. I have a small problem. I have a text field. When user types some text into it i display a pane in the GUI. When the text field is cleared, i need to hide the pane. So basically i need to detect the condition when the text field is empty.
    I tried one approach in which i capture key press event. So when user presses the backspace key to clear the text field, the event is fired. In the keyPress method, i check if text field is empty using getText() method.
    So my keyPressed method is as follows:
    keyPressed()
    if(textField.getText().trim().equals(""))
         // make my pane invisible here
    This does work , however it requires one additional key press before detecting that the text field is empty. For ex if there are 3 letters in the text field, i require to press the backspace key 4 times to hide the pane. I think this is because the key presses event occurs first & is handled & after that the GUI is repainted with the new data.
    Any idea how i can tackle this? Or is there any other way in which i can detect the moment the text field becomes empty?

    Demo:
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DocumentListenerExample {
        public static void main(String[] args) {
            final JLabel state = new JLabel();
            final JTextField field = new JTextField(10);
            field.getDocument().addDocumentListener(new DocumentListener(){
                public void insertUpdate(DocumentEvent e) {
                    change();
                public void removeUpdate(DocumentEvent e) {
                    change();
                public void changedUpdate(DocumentEvent e) {
                private void change() {
                    String text = field.getText().trim();
                    state.setText(text.length()==0 ? "empty field" : "non-empty field");
            JPanel cp = new JPanel(new GridLayout(1,2,8,8));
            cp.setBorder(BorderFactory.createEmptyBorder(8,8,8,8));
            cp.add(field);
            cp.add(state);
            field.setText("enter your text here");
            JFrame f = new JFrame("DocumentListenerExample");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setContentPane(cp);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • Expanding text fields

    I have inserted text fields, but they only allow a one line response. I was told to go to text fields, then format, then word wrap and then to put in total characters, but can't find any of those options. I was also told not to upload a pdf file to forms, but when i tried my document in word doc format it wouldn't let me select it to upload. I can make the fields in the pdf version, but none of these options appear. How do i set up text fields that allow for long answers, or alternatively, is there a way to make a pdf writable to someone can fill out a questionnaire?

    If you asking about a text field that you create in Acrobat, you need to bring up the text field properties dialog and select the Options tab, and select the Multiline option. You can specify a character limit, but you don't have to. If you select the "Scroll long text option, the user will be able to input more text than can be displayed in the field at one time.

  • Expanding text fields side-by-side in a 2 column layout

    Hi,
    I've been trying to create a form that is a 2-column layout. This form contains expanding text fields that are side-by-side with additional form elements underneath. I managed to get the expandable fields to work, however, if the user writes too much in the text field in the left-hand column and it wraps onto a second page, the text field in the right-hand gets pushed to the second page. I am wondering if someone has experience with this and could help me figure out how to make sure the text field in the right-hand column stays in place as the text field in the left-hand column expands onto 2 pages.
    I've tried to wrap each text-field in their own subform that stays fixed, but that seemed to cause the field to expand over the elements below it.
    Take care,
    Carolyn

    Luke23ae wrote:
    for my bachelor-thesis I'm trying to create a 2 column layout in pages. The left column should contain all contents, the right column should only contain notes and additional information supporting the 'main' column. So the right column only contains a little text every now and then. Using the Layout Inspector and setting up 2 columns fills the right column automatically withe the contents overflowing the left column. What I'm hoping to archive is to create a 2 column layout leaving the right column blank, allowing me to insert Text-fields (unless there's a better way) wherever I need to add an annotation.
    Hi Lukas,
    Welcome to Apple Discussions and the Pages '09 forum.
    Since you want the text to flow from page to page in the left column, it would appear best to use a single column for the main text, and to limit the width of that column using the right margin stop.
    That leaves the right half of the page open for a series of text boxes (or shapes, as shown) to contain the notes and additional information.
    I would start with a single text box or shape, resize it to the width you want, then duplicate that one each time you need a new box. That way all your text blocks have a common width to begin with, and if you take care to use only the handle at the center of the bottom edge to resize them, you will not disturb that width setting.
    As noted earlier, the floating objects will not automatically travel with the text they apply to if editing causes that text to move.
    Regards,
    Barry

Maybe you are looking for

  • 50 % down payment in MIRO

    Hi Gurus, please suggest a possible solutions for this scenario, we process the payment for this vendor with 50% down payment thru F-47 and how to call-up in MIRO with remaining balance only? because when we do the MIRO it reflect the whole price of

  • Selecting Overset Text In InCopy CS5 [AppleScript]

    I am trying to fix the AppleScript I used in InCopy CS3 to select overset text in CS5. In my old script I tell InCopy to select the overset text in the current story. Simple command: select text of last text column of myStory In CS5 it now selects th

  • Cannot encrypt Password in MDSS file...

    Hi All, Can in  mdss.ini file we encrypt the password for repository with user id other than Admin? issue is i change the password in console for Admin and then try to login datamanager with Admin user id ,but it fails saying Invalid login credential

  • MDM 7.1 : Not able to connect to repository

    Hello, I am facing problem while connecting to repository via MDM Console. It gives below error. Repository connection failed. Error : Access to syncronization data is locked for master repository. Same error I am getting when I try to connect to new

  • Open hub destination of text and attribute for Functional Area

    Hi Expert I have a requirement to accommodate both attribute ( 0FUNCT_LOC_ATTR)  and text ( 0FUNCT_LOC_TEXT ) for functional area in open hub destination .For this a DSO has been created from both 0FUNCT_LOC_ATTR, 0FUNCT_LOC_TEXT data sources .Proble