What lines of code makes a text field remember value?

Hi, what lines of ADDT code makes it possible for a text field to remember value?
For example I have 2 text fields on my form and my database is set not to allow null values. If I fill only first text box and click submit, my form will remember the first text box value and will instruct me to fill seconds text box.
My problem is that some fields on my form do not remember the values entered if I make a mistake when filling my form.

:: Recall Form Values script ::
This script remembers the value entered into any form textbox (input type=text) by the visitor, and upon his/her return, preloads the textbox with that value. It's very useful for forms that get used repeatedly by the same visitors and contain the same values each time, such as the "name" or "email" field of a "Recommend Site" form or blog comments form. Just as useful is this script's ease of installation- specify a form textbox value to be retained just by giving it a class="memorize" attribute!
Tags:
forms |  JS |

Similar Messages

  • How to make a text field wrap to next page

    I've done my best to find the solution to my problem before coming here to post, so forgive me if I've missed a previously posted solution.
    I am a .NET coder, using iText to manipulate PDF's.  I need to create a template for a corporate invoice that will allow me to have header and footer content on a page, surrounding the invoice detail section and have the invoice detail wrap to the next page as necessary.
    Criteria:  All pages have the invoice header.  All pages have the invoice footer with pagination (i.e. Page 1 of n).  The number of pages is controlled by the number fo lines in the invoice detail text field.
    For example, if the text field holds 30 lines and each line item takes up a single line.  An invoice with 25 line items would only use one page.  If the invoice has 35 line items, the content in the text area needs to flow to page 2 in the invoice detail area.
    I have tried every combination I can dream up in Adobe LiveCycle Designer and I cannot get a document set up that will flow from page 1 to page 2.
    For me to be able to access invoice detail field in code, it appears that it needs need to be a Text Field.  I've been able to access the fields from my .NET code and fill them in without issue.
    What I cannot get is a template that will allow me to put more content in the detail area than fits on page one and have it automatically create a second page and flow the content into the detail area.
    Can anyone point me in the right direction, or provide a working sample PDF?
    I.e.
    PAGE 1:
    MY COMPANY
    ADDRESS
    INVOICE #20
    Line item #1
    Lilne item #1 detail
    Line item #2
    Line item #2 detail <from here, detail must flow to the detail section of the next page>
    Page 1 of 2
    PAGE 2:
    MY COMPANY
    ADDRESS
    INVOICE #20
    Line item #3
    Lilne item #3 detail
    Line item #4
    Line item #4 detail
    Page 2 of 2

    While I appreciate the direction to the samples, that is not resolving my issue.  I had already seen the samples before I posted in this forum.
    None of the samples have what I've requested assistance with above.
    I need a static 3" header, a 5" content area and a 1" footer on every page in a document.  I want to be able to put content in the content area and have it wrap to subsequent pages if the content is more than will fit in the area.  Each subsequent page must also have the 3" header, 5" content area and 1" footer.
    This will not be edited in Acrobat, it will be edited in .NET code without human intervention, so having click buttons to add another row to a table is not an option.
    I could create the entire PDF programmatically, but I'm seeking to find if Adobe LiveCycle Designer can make the PDF form in an easy to use GUI.
    If the details of my need above do not provide a clear requirement, feel free to point that out.

  • How do u make a text field for int only

    Hi I wanted to make the text Field int only
    I.e
    int temp = 0;
    temp = testField.getText();
    Thanks in advance

    Rarna, I think this is what you are asking. This is a bare-bones TextField that only accepts keys that are numeric. I found that the left and right arrows still work. Backspace and delete do not so you would have to add additional case statements and code to handle these if you want to support them. I added a main method to try this out.
    import java.awt.*;
    import java.awt.event.*;
    public class NumericTextField extends TextField implements KeyListener {
       public NumericTextField() {
          super();
          this.initField();
       public NumericTextField(int columns) {
          super(columns);
          this.initField();
       public NumericTextField(String text) {
          super(text);
          this.initField();
       public NumericTextField(String text,int columns) {
          super(text,columns);
          this.initField();
       private void initField() {
          setEditable(false);
          addKeyListener(this);
       public void keyPressed(KeyEvent e) {
          int key=e.getKeyCode();
          switch(key) {
             case KeyEvent.VK_0:
             case KeyEvent.VK_1:
             case KeyEvent.VK_2:
             case KeyEvent.VK_3:
             case KeyEvent.VK_4:
             case KeyEvent.VK_5:
             case KeyEvent.VK_6:
             case KeyEvent.VK_7:
             case KeyEvent.VK_8:
             case KeyEvent.VK_9:
                setText(getText()+e.getKeyChar());
       public void keyReleased(KeyEvent e) {;}
       public void keyTyped(KeyEvent e) {;}
       public static void main(String[] args) {
          Frame f=new Frame();
          NumericTextField ntf=new NumericTextField();
          f.add(ntf);
          f.pack();
          f.setVisible(true);

  • How to make a text field exactly 3 chars wide?

    I have an telephone area code item text field in a form which only can be input 3 digits. How can I make this text field exactly 3 chars or digits wide?
    Appreciate!

    244805,
    What browser are you using?
    I just set up an item with Width & maxWidth of 3, and I cannot type more than 3 characters in it. I also changed Width to 1, and it still worked as I expected.
    As I alluded to in my prior post, the size is approximate - it all depends on the font size used.
    Thanks,
    - Scott -

  • How to make a text field smaller in size

    Can I make a text field smaller in size (not just the length
    but also the height) depending on the font size eg 10px. Whatever
    font size I seem to use the text field stays the same size.

    Can you give an explicit example of what you want? Are you
    referring to the
    font size that someone sets in the browser, or the size you
    set in the page?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    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
    ==================
    "~Billy~" <[email protected]> wrote in
    message
    news:fa3oh4$67u$[email protected]..
    > Can I make a text field smaller in size (not just the
    length but also the
    > height) depending on the font size eg 10px. Whatever
    font size I seem to
    > use the text field stays the same size.

  • How can I limit numeric codes in a text field?

    How can I limit numeric codes in a text field? For example I want to list Industry SIC codes and I want to block someone from inputting an exlcuded industry code.

    We don't offer that type of input restriction for a text field. 
    Can you create a list of all allowed codes and use a Drop Down menu or Single/multiple Choice field? 
    Thanks,
    Josh

  • How do I make my text field automatically upper case?

    How do I make my text field in a form automatically upper case?

    Use the following as the text field's custom Keystroke JavaScript (choose a Format type of Custom):
    // Keystroke script for text field
    event.change = event.change.toUpperCase();

  • How to make the text fields as mandatory (in 'notes and attachment' tab)?

    Hi,
    We have defined some Fixed Values for texts under IMG>SRM>SRM Server>Cross Application Basic Settings>Text Schema>Define Fixed Values for Texts, for a certain transaction type of RFx responses for a text schema.
    Because of this, the bidder can choose one of these fixed values for texts. This is perfectly working fine.
    Now the question is, we want to make the texts fields as mandatory. i.e. The bidder should not be able to submit the responses if certain texts are blank.
    Is there be any BadI for this?
    GH

    You can use BBP_DOC_CHECK_Badi for this field validation using a filter value RFx/Bid (I ont remember exact word).
    Regards,
    Jagadish.

  • What line of code do I need to use to run flashplayer offline in a HTML presentation?

    I have a client who has had an HTML presentation built that uses Flashplayer when online, using the following lines of code:
    <!-- flash embed part -->  
                 <div id="flashPreview">
                     <a href="http://www.adobe.com/go/getflashplayer">
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
                     </a>
                 </div>
    He now wants to use it off line. What line of code to I need to add to the header to run Flashplayer on the local machine instead?
    thank you

    HI Mike,
    thank you for your help. The file was built by someone else, so trying to get inside their head!!
    There is coding for the expressInstall.swf:
    // FLASH EMBED PART
                                  var flashvars = {},params = {},attributes = {};
                                  params.quality = "high";
                                  params.scale = "noscale";
                                  params.salign = "tl";
                                  params.wmode = "transparent";
                                  params.bgcolor = "#111111";
                                  params.devicefont = "false";
                                  params.allowfullscreen = "true";
                                  params.allowscriptaccess = "always";
                                  attributes.id = "flashPreview";
                                  swfobject.embedSWF("preview.swf", "flashPreview", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
    but nothing for the swfobject_modified.js, where would I put it???
    I really appreciate your help

  • I created a Custom list New Form and need to make the text fields read only

    When I use SharePoint Designer and add the read only attribute  to the  SharePoint form field, then it throws  a web part error.
    but here is the thing, I have current user Filters populating the Form Fields. So the form fields  populate First name , last name etc. and I need these fields read-only....
    the Client doesn t want the end user to Change those fields.  Is there any way to "LOCK" the form fields?
    As I have only 7 text fields that need to be locked down. and one field is a signature line that is a true input field.. where the  user has to inter their initials.
    Any ideas? as I have tried most of the items available thru searches nothing works, or it throws that web part error message.
    Steve Athey

    Daniel: ( I'm now at work, a different ID is logged on for me)
    I used SharePoint Designer.
    Steps:
     created a web part page
    then on the SharePoint Designer ribbon I then went to insert:
    new item form
    Then I selected my data source (list)
    then I placed the 8 columns on the page
    a page viewer web part to pull the manual that people have to read.
    and 7 current user filter webparts. (1 for each form field) Yes it is over kill, but I'm trying to keep this straight out of box as much as possible...
    then for the form fields
    I added a parameter and the read only tag see below in bold:
    <asp:TextBox runat="server" text="{$ParamEmployID}" id="ff17{$Pos}" __designer:bind="{ddwrt:DataBind('i',concat('ff17',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Employee_x0020_ID')}" 
    ReadOnly="True" />
    I also  added the parameters in the ribbon area
    the error message doesn't tell me much, it just send me to web part maintenance page... 
    if I removed the  ReadOnly = True then the error  goes away.....   So I was trying to find a  quick simple  JQuery and or javascript   code item that would  make  the 7 text fields readonly and leave the
    8th  text field alone  to allow people to place their initials on the page to say that they read the manual.
    I have  created hundreds of these types of pages .. this is the first time I have run into this issue, but it also the first time I have tried to use the ReadOnly = True item.
    Any Ideas  and or thought on how to make the  items read only? and not throw the error.
    Steve

  • Make short text field in Purchase order creation only display..

    Sir,
    Yeah my requirement is quite unusual, but such is the situation.
    I want to make the short text field in purchase order creation "only disply". what is happening is that user while creating PO is able to change the text of material in short text column. I want to make it only for display.
    Can it done on document type level, since for service type, and Text type of account assignment cat, only text field is filled up. so how to do it.
    Please assist...
    Rahul

    Dear Rahul,
    If you want to have the short text display only for standard item but not service item, you may check below customizing.
    Transaction SPRO:
    MM-PUR-PO
    -> Define screen layout at document level
    Field Selection group: Basic Data, Item
    Field Selection Key:  PT0F Standard item purchase order
    Field: Short text -> set as display
    Hope this help.
    Ian Wong Loke Foong

  • How do I make a text field expand in depth so I can see it in print?

    I am totally new to making forms in Designer. So please bear with me.
    I created a simple form for teachers to use as an evaluation tool. A question is asked on the form, and the teachers have space to reply in the text field just below.
    The trouble is, I want the expanding field to actually "push" the content below it as the field increases in depth. That way, when users print the form for the record, their responses can be viewed in their entirety on the page.
    At the moment, the text fields expand with *scrollbars,* which allow multiple lines of text -- but when you print, you only see a few lines.
    How can I accomplish this?
    Thanks to everyone for your help. -- Barbara

    Hi Barbara,
    Basically, you do it by creating a dynamic form.
    WARNING: When you do this, other parts of your form may go wonkers if they're not set up carefully, so be sure and save a copy of the original first.
    --Be sure your form is saved as a dynamic PDF. Check to make sure the preview type is set for Interactive (File menu > Form Properties > Defaults > Preview Type)
    --Set the text field itself to "Expand to fit" (Layout palette, Height)
    --Wrap it in a subform set to "Flow Content" (Object palette, Type. Also check "Allow Page Breaks within Content" on the Object palette)
    --Set the main subform for the page it's on to "Flow Content" as well.
    You'll still see the scroll bars, but after you exit the field it will expand the way you want it to.
    You can read up on the two types of subforms in Designer Help.
    Let me know if that works for you.
    Ann

  • Acrobat Forms -- how do i make a text field opaque when typing

    I'm new to the Forms formatting, so bear with me. I'm trying to create a fillable form which has rules to fill in by hand. How can I create a text field box that will cover the rules behind it if someone chooses to type the info instead of handwriting. I found a script that almost works:
    if (event.value.toString().length > 0) {
    event.target.fillColor = color.white ;
    } else {
    event.target.fillColor = color.transparent ;
    The only problem with this is that the rules show while typing on top of them. The box turns opaque when a new entry is made in another field. Anyway to make the box opaque while they're typing ?

    Here's a link to a demo that I believe behaves as you want: https://workspaces.acrobat.com/?d=AG6oZ3bi3DYHokxDPeWN7A
    It is controlled by several scripts, so study them to see how it works.

  • How to make a text field required at run time when the user clicks the checkbox ?

    I got a form where , there are several checkboxes and text fields associated with that checkboxes.If the use clicks on the check box then the associated
    text fields should become required.I have tried the change event and the click event for the checkboxes.It gives error in the onChnage event and I got some weird results in the on click event .Sometimes if the user click the check box , then for the 1st time the field doesnt become required , then the user onclicks the check box and when the user clicks the checkbox for the second time the field becomes required,but if i deselects the highlighted field option and selects it again the field becomes required even if the user onchecks it I am totally confused !!! Adding to it i have also written the wrong code still i achieved the desired result ?? How it can be possible . I am writing the codes below , please help me as i am working under a deadline from the client.
    onChange event :
    var newVal = this.boundItem(xfa.event.newText);
    if(newVal == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "disabled";
      else
         xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "error";
    For the onClick event :
    var a = xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovere d_OnlyEnergyCharges").rawValue;
    //app.alert(a);
    if(a == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "error";
      if(a == 1)
          xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "disabled";
       Please help someone !!!

    I used the onchange event and wrote the code for it. I got the result . But there is a problem.All these fields are in a table and it's a dynamic table where you can add rows dynamically at the run time .I have other change event for some fields in this table .All are working fine when i add the row.But for this check box the required fields are not validated as required at the run time . I am here giving the code , Please help me .
    form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharge s::change - (JavaScript, client)
    if(this.rawValue == "1")
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory= "error";
    else
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandator = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory = "disabled";

  • If a checkbox is selected how to make a text field required

    Hi
    I hoping someone out there can help me.
    I am creating a form in adobe acrobat 9, I have a checkbox called 'other' and a text field named 'other_please_specify'. What I am hoping to do is when a user selects the 'other' checkbox the 'other_please_specify' text field becomes required. I will also need some sort of action that if a user deselects the 'other' checkbox then the 'other_please_specify' text field is no longer mandatory.
    Can anyone help me figure this out?
    Thanks in advance

    If by required you mean the required property of the field, the Mouse Up script of the check box can be something like:
    (function () {
        // Get a reference to the text field
        var f = getField("other_please_specify");
        // Set the required property depending on the check box state
        if (event.target.value !== "Off") {
            f.required = true;
        } else {
            f.required = false;
    The "if" block can be simplified to:
        // Set the required property depending on the check box state
        f.required = event.target.value !== "Off";

Maybe you are looking for