Position cursor in text field when form is opened

Another newbee question I'm afraid!
I want to position the cursor in a text field when a user opens the form. I can't find a way to do it but I'm pretty sure it's straightforward!
Also, can I remove fields from the tab order?
Thanks (for your help and patience!)

Hi,
You would select the object that you want to receive focus and put the following in the docReady event.
xfa.host.setFocus("this");
The docReady event is a good one to use, because it only fires once.
The tab order can be set in the Tab Order tab. Depending on the version of LC Designer that you have, the flexibility will vary. However I would do this as a last step, as any changes can throw the tab order out of sequence.
Note that tab order is greatly affected by the relevant x/y coordinates of objects and where objects are in separate subforms.
Hope this helps,
Niall

Similar Messages

  • How do I auto populate the date into text fields when form is first opened?

    Hello,
    I read all about the changing the scripts but its not really working for me. I was hoping someone could help me with directions on how to auto populate the date into designated text fields when my adobe document is first opened?
    I am working in Adobe Acrobat 9.
    Thank you,
    Sheri

    When you add a new document JavaScript (Advanced > Document Processing > Document JavaScripts > Script Name (enter something) > Add), you will be given a function skeleton by default. Just delete it and enter the line of code I showed above. Now, whenever the document is opened, the code will get triggered and the field will be updated with the current date. There is no "Document Open" action (at least that's accessible via Acrobat's UI), but this is effectively the same thing since any document-level JavaScripts are executed when the document is opened.

  • No select all text in text field when I mouse in

    Hello
    How can I go to next row in a multi-text field when I point my mouse in?
    That is, I don't want (when I fire in) have all text select but i want write soon, otherwise as soon as i begin to write all text inserted in it is deleted
    Thanks

    HI user560737,
    After over 170 post still
    a. No Forms version
    b. No friendly handle
    c. Inadequate and incomprehensible description
    Perhaps one or more of the following are true
    1. Members of this forum are not equipped to help you.( So, why bother to post?)
    2. You are not appreciative of the help being extended to you, in the form of marking posts helpful / correct
    3. You do not articulate and follow through on your post.
    How else can one explain
    Handle:      user560737 Status Level:      Newbie
    Registered:      Feb 24, 2007
    Total Posts:      171
    Total Questions:      37 (35 unresolved) >
    How can I go to next row in a <b>multi-text field</b> when I point my mouse in?That is, I don't want <b>(when I fire in)</b> have all text select but i want write soon, otherwise as soon as i begin to write all text inserted in it is deleted

  • Change the position of the text field in the report region

    Hi,
    I am having a report region in whch there are 2 buttons which are in the Region Template position #Create# and a
    text field. I added a text field in the same region. I tried to change the position of the text field near the buttons. I
    tried to change "label-Horizontal/vertical alignment" and "Element horizontal vertical alignment". But the postion of the
    text field is not changing. Plz help,
    Thanks,
    TJ

    Hi Andy,
    Sorry to ask this questions.
    1.Where exactly i need to change the HTML code(By uisng the view source?)
    2.My taskname part html code when viewing the source is given below
    tabindex="999"><img src="/i/e.gif" alt="Edit" class="eLink" />
    </a><tr></td><td nowrap align="left">
    <label for="P1_TASK_NAME" tabindex="999">
    <a class="t16OptionalLabelwithHelp" href="javascript:popupFieldHelp('5853137628393530415','676839962625525')"
    tabindex="999">Task Name</a></label></td>
    <td  colspan="1" rowspan="1" align="left" valign="top"><input type="hidden" name="p_arg_names"
    value="5853137628393530415" /><input type="text" name="p_t06" size="10" maxlength="20" value=""
    id="P1_TASK_NAME"  /><a class="eLink" title="Edit" href="javascript:popupURL('f?
    p=4000:371:676839962625525::::P371_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:5853137628393530415,107,1');" 
    tabindex="999"><img src="/i/e.gif" alt="Edit" class="eLink" /></a></td></table>
    <table summary="" cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td align="right"><table
    cellpadding="0" cellspacing="0" border="0" summary="" class="t16Button">please suggest what changes i need in this code to change the alignment of the task_name text field,
    Thanks,
    TJ

  • How do i expand a field in a line with 3 other fields when forms design will not allow

    how do i expand a field in a line with 3 other fields when forms design will not allow it? I also want to shrink one of the fields and cannot do so.

    It is possible that all there is not enough room on your line to grow the field. You can try a few things :
    - Make the form width wider by dragging the right edge of the form or via the Form Setup dialog (File > Form Setup... and change the Form Width)
    - You can make other field on the row narrower (if they are not already at their minimum width).
    Each field type has a minimum width. What field type are you trying to make smaller?
    For example : Text and Multiline can go down to a width of 30. Dropdown min width depends on the length of the long item in the dropdown list.
    Hope this helps
    Gen

  • How to give error message for the screen element text field when wrong i/p

    How to give error message for the screen element text field when wrong i/p
    when wrong input given
    eg. 
    I have a text box with SBOOK-CARRID
    so when user give wrong entry in text box i.e LG
    then I should give some error stating that the the input is invalid or not available ,
    now it showing the error of standard messages,
    i want manual message to be displayed when error comes.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    Hi all,
    Thank you for your valuable reply,
    but the thing is that its a screen field,
    i.e text box not a selection screen
    i created in screen layout
    with name sbook-carrid
    now i want to get error message display if wrong i/p is given
    thank you.
    Regards,
    Jagrut bharatkumar Shukla,

  • Formatting of text fields when exporting from InDesign to Acrobat Pro

    How does one preserve the formatting  of a text field when exporting from InDesign CS6 to Acrobat Pro? It loses both the font and the alignment formatting in the PDF.

    Use a font that allows embedding/ check the font embedding settings in the PDF output settings.
    Mylenium

  • Retaining the cursor on a Text Field when error on the field

    Hi,
    We have a requirement, where when we tab out of a text field, the data entered gets validated and exceptions are caught using array list and then thrown on top of the page.
    However, we have a requirement, that on tab out, the cursor should remain in the same field in case there are errors thrown on that field otherwise should move to the next field.
    My Approach is
    1) Capture the tabout event in PFR.
    2) If the validation returns erorr messages, do a forwardImmediately to CurrentPage
    3) Set the focus in PR and throw the exception.
    I read the discussion on the link How to set focus on a textinput/poplist using PPR
    and tried the same approach but below are my observations.
    Approach - 1) WITH FIRE PARTIAL ACTION on text field.
    Input = Invalid, then error message is thrown and I am not able to see the cursor.
    Input =  Valid  , then I see the cursor in the next text field, which is correct.
    Approach - 2) WITH FIRE ACTION
    Input = Invalid, then error message is thrown, the text in the textfield looks selected, which is the required functionality.
    Input =  Valid, then still I see the same text as selected. Here I dont want the text to be selected and want the cursor to move to the next field. This is not happening.
    Please let me know where exactly I am committing the mistake.
    Thanks
    Saurabh
    Edited by: SaurabhAg on Jan 25, 2012 5:53 AM
    Edited by: SaurabhAg on Jan 25, 2012 6:06 AM
    Edited by: SaurabhAg on Jan 25, 2012 6:44 AM

    Can someone please reply to this. Its urgent.
    Thanks
    Saurabh

  • Can I set up a form so that there is text in the fields when the user opens the file?

    My client is interested in supplying schedules of activities in a PDF, and would like it so that a person can use what's in the document, or replace their own information in place of what's supplied.
    I've set up forms for filling in blanks, but I've not seen if some text can be left in the fields to start with. For example, leaving a "your name" text line in a field where the user clicks on that phrase and it disappears (like you see in a number of forms on web pages).
    Is this possible with Acrobat? If not, we'll probably have to go to a Word based solution, but I'd get better design if I do it in InDesign and add this functionality to a PDF.

    George,
    Thanks for keeping track of the discussion. I appreciate that you've taken the time to help me. My clients love the fact they can create these curriculum schedules with editable blocks that will allow the original info to return if the block is emptied. Now they'd like book titles italicized.
    I downloaded the Javascript reference PDF and found the "richValue" information, but I'm not grasping the concept of how to add it to my page. I'm not Javascript-literate, so I'm more inclined to add HTML tags or something like
    and to make something italic.
    Here is the example they gave:
    Example
    Turn all bold text into red underlined text.
    // Custom format event for a rich text field.
    var spans = event.richValue;
    for ( var i = 0; i < spans.length; i++ )
    if( spans[i].fontWeight >= 700 )
    spans[i].textColor = color.red;
    spans[i].fontWeight = 400; // change to default weight
    spans[i].underline = true;
    event.richValue = spans;
    I think I understand the 400 and 700 numbers as font weights, and that "underline" could be replaced with "italic". So I'm trying to figure out what I would need to write in order to make specific words italic in a block of text in the example you provided:
    // If field is blank, display this text
    if (!event.value) event.value = "Your name here";
    Can a span be ID'd by placing a sort of tag around the words? Like... (pardon my fake Javascript)
    // If field is blank, display this text
    if (words.are) 'i' then italics = true
    if (!event.richValue) event.richValue = "Your 'i'name'i' here";
    (You're probably laughing at my attempt here, but I hope my point is made :-) ).
    David

  • No Cursor In Text Field - any browser

    I'm fairly new to actionscripting and this forum. I'm not
    sure if this is the right place to post, but it has to do with
    posting data from a form.
    I have come across an odd and very frustrating phenomenon
    with a simple flash form. The text fields do not show the blinking
    cursor or the text being entered, but when submitted, the email
    shows all text entered.
    The form is an external movie being loaded into a mc -- I'm
    sure this is the problem, but it should be possible no?
    Here's the thing -- I have tested the form on it's own and it
    works fine. I have also tested it being loaded into a loader
    component and it works fine. (see both examples here:
    http://www.heymisterdj.com/contact.htm
    But in the main movie, swf, the text fields just won't show
    text.
    (see here - click on Contact -
    http://www.heymisterdj.com/newframe.htm
    Any ideas?
    I don't know if it will help but I have included the AS for
    the contact button here.
    ---

    If you click on the page header (page definition - edit attributes button in v2.0) and then under the display attributes section you will find a focus cursor select list.

  • How to set cursor to text field from message box in swing

    I am working Text Field validations in a swing application. when incorrect information is entred in text field a Message is displayed. When I click on OK button on message box I want to set the cursor position to that particular text field for which thet message is displayed.

    theOffendingTextfield.requestFocusInWindow();may need to be wrapped in a Swingutilities.invokeLater,
    and if you want the text highlighted (so you can just type in new text)
    theOffendingTextfield.requestFocusInWindow();
    theOffendingTextfield.selectAll();

  • Hide cursor in text field

    I am using developer 6i. There are many text fields in a form. When user start feeding, cursor hides in some text fields during feeding and user may in dout where is the current focus. Plz help me. I will be thankful.
    Edited by: Saif-ur-Rehman on May 27, 2009 11:37 AM

    If you click on the page header (page definition - edit attributes button in v2.0) and then under the display attributes section you will find a focus cursor select list.

  • Text Area steals Focus from Text Field when selected with mouse

    I have created a very simple form with 4 spry validation elements here :: http://octopusdesign.net/contactus.html
    When I attempt to select the 'Your Email' text field using the mouse, focus is grabbed by the text area above it.
    It is only possible to get focus on the 'Your Email' text field by using tab.
    My best guess is that this is a bug in the framework.
    In addition to updating my spry libraries to 1.6 from 1.4 I've tried the following things::
    Reordering the elements in the form.
    Creating the elements in a different order.
    Replacing the validation elements with ordinary elements.
    None of these fixed the problem.
    Strangely, if I remove the validation text area there is no problem.
    If anyone can shed some light on this I would really appreciate it.
    Wisdom gratefully received.
    Chris

    Furthermore ::
    I've tried to reconstruct the form from scratch and discovered that if you have a validation text field and a validation text area in any order on the form, selecting the 2nd element with the mouse always results in the first element stealing the focus.

  • How do I center a text field when input can be single or multi-line?

    I'm creating a form in Adobe Acrobat Pro XI and have almost everything the way I want it.  One of my last problems is trying to get a text in a text field centered.  The input is sometimes a single line and sometimes multi-line.  If I set it up so the multi-line entries are centered, then the single line looks off ... and vice versa.  Is there any way to have the text automatically centered in the text field regardless of whether it's single or multi-line?

    Unfortunately, there's no way to set up a field so that the text is guaranteed to be vertically centered in both cases. If you set it up so that rich text formatting is enabled, it's possible for a user to vertically center, but it's not something you can preconfigure so that it will remain in effect when the field is cleared. For a user to do this, with the focus set to the field they'd have to display the Properties toolbar (Ctrl+E), click the "More..." > Paragraph > Alignment > Text Middle [button]

  • How to change a list/menu to a text field when 'Other' is chosen?

    Hi there. I've been trying to solve this for a week now and I have depleted all my resources, that is why I'm here. I even went to jquery but nothing works and I think I was over-complicating this way too much.
    In short: I have a contact form, which have a list/menu with validation, and one of the options of that list/menu is "other". What I want is that when the user select "other" automatically change to a text field in order to let the user put his custom color. This is what I have:
    <form method="post" action="process.php">
    <span id="spryselect1">
    <label for="colors"></label>
    <select name="colors" id="colors">
    <option selected="option1">Blue.</option>
    <option value="option2">White</option>
    <option value="option3">Red</option>
    <option value="other">other</option>
    </select>
    <span class="selectRequiredMsg">Please select a colour.</span></span>
    <input type="submit" value="Send">
    </form>
    I know now that the approach is to show/hide a separate textbox besides the other... well. I don't know how to implement that, I think I really need your help guys. I'm completely frustrated.
    Thanks in advance.

    Have a look at the following
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="http://labs.adobe.com/technologies/spry/widgets/selectvalidation/SpryValidationSelect.css" rel="stylesheet">
    <link href="http://labs.adobe.com/technologies/spry/widgets/textfieldvalidation/SpryValidationTextField.css" rel="stylesheet">
    <style>
    .hidden {display:none;}
    </style>
    </head>
    <body>
    <form action="" method="post">
      <span id="spryselect1">
      <label for="colors">Colours:</label>
      <select name="colors" id="colors" onchange="MyOnClickHandler(this.value)">
        <option value="">Please select...</option>
        <option value="blue">Blue</option>
        <option value="white">White</option>
        <option value="red">Red</option>
        <option value="other">other</option>
      </select>
      <span class="selectRequiredMsg">Please select a colour.</span></span><span id="sprytextfield1">
      <input name="other" id="other" class="hidden" type="text">
      <span class="textfieldRequiredMsg">A value is required.</span></span>
      <input name="" type="submit">
    </form>
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryDOMUtils.js"></script>
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryValidationSelect.js"></script>
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryValidationTextField.js"></script>
    <script>
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
    var sprytextfield1;
    function MyOnClickHandler(value) {
         if(value =='other') { //show text field and set validation
              if(!sprytextfield1){
              sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
              Spry.$$('input#other').removeClassName('hidden');
         } else { //hide textfield and destroy validation
              if(sprytextfield1 && sprytextfield1.destroy){
                   sprytextfield1.resetClasses();
                   sprytextfield1.destroy();
                   sprytextfield1 = null;
              Spry.$$('input#other').addClassName('hidden');
         return false;
    </script>
    </body>
    </html>
    Gramps

Maybe you are looking for