How to make a text field become empty when clicked in.

I have an input textbox, if the user clicks 'submit' and the
box is empty, it returns "please type answer here" in the input
box. Is there a way to make it so when the user clicks in the input
box it will turn back to blank and be ready to type instead of
having to select the existing text and delete it?
Thanks :)

yep, use the onSetFocus method.
my_text_field_instance_name.onSetFocus = function() {
my_text_field_instance_name.text = "";
but be careful here, because if the user fills in there info,
then clicks off the text field then back on, the text will
disappear, you will need to use a combo with onKillFocus or an if
staement.... play with it. its real simple
corey

Similar Messages

  • 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 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.

  • 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.

  • 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";

  • 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";

  • 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 to make a button appear boxed in when clicked

    For my Prototyping class I have to make an interactive fast food ordering system. I have majority of frames made I just need to add the interactive part to it. I am using AS2 in Flash CS3. I have the picture and the text grouped and are classified as a button. I want to make it so that when the picture or text is clicked it will make a black box appear around it, making it 'selected'. I've tried to add an Event Listener but couldn't figure out how to make the box appear on it. Any suggestions?
    These pictures are basically what I'm trying to accomplish.
    Keep in mind, I'm a Flash newbie, I have a probably 3 hours experience with Flash.
    But I do have knowledge of basic Java commands, so I can understand code.
    Thanks,
    Dudejoe04

    Onw way would be to create the buttons as movieclips so that when they are selected you move the movieclip's timeline to a rame that shows the rectangle around it.  Another way would be to have the movieclips as separate objects that you make appears when its associated button is clicked.  There are likelynumerous other possibilities.

  • How to set a date field to sysdate when clicking on create button ?

    Hello , when the user clicks on the create button , he should see 'sysdate' by default on the date from field .. When do I add such a validation please ?
    I tried adding a business rule on the entity object and set the expression as 'adf.currentdate' but it didn't work .
    Any help please ? Thanks.

    See
    Dare to Code...: current date time groovy for ADF

  • How to make a screen field as selected when we place the cursor in the fiel

    Hi,
       I have a requirement like, needs to be automatically select a screen field value when i place the cursor in that field.
        The screen field value should be displayed in blue color as like we select the value using shift-end. when a new value is entered in that field, it should over-write the existing value.
         Any pointers would be appreciated.
    Thanks,
    Gopi.R

    Hi Gopi,
    you can look into some examples in transaction
    DWDM or BIBS
    Thanks,
    Krishan

  • 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 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 add new text field in standard report

    how to add new text field in standard report?

    Hi,
    I presume you are talking about a report display in ALV and u wish to add a column to it .
    If it is a global requirement ,as in table being used there in ALV can be modified, then you can append the table and the system should pick up the same automatically from there.
    Otherwise , you can make a Z program . Modify the catalog being used in ALV.
    Regards,
    Shweta

  • How to make the text in sub-division

    Hi,
    I am usign text  module in my adobe forms.
    Text in text module contains sub-divisions as a), b) and c). Each sub-division are in a separate line.
    While in pdf, all the sub-division combines and comes a single paragraph.
    What  would be the problem for this issue? Any Idea?
    May I know how to make the text in sub-division as in text  module?
    Thanks,
    Thiyagu
    Edited by: Thiyagu on Oct 26, 2009 7:08 PM

    Hello, experiment with Object - Field tab. Do you have your text field with "allow multiple lines" checked? I guess so. And what about the field format? Plain text or Rich text? Please try:)) Regards, Otto

  • Make all text fields read only after signing form

    Hello,
    I have a live cycle form which needs to have all of the text fields set as read only after signing.
    The java script has been placed in the post sign event of a digital signature field.
    for(var i=0;i<this.numFields;i++) {
    var cNm = this.getNthFieldName(i);
    if (cNm.type = "text") this.getField(cNm).readonly = true;
    After signing the form the following console error is shown:
    this.getNthFieldName is not a function
    Can anyone please advise how to revise the script so that when the form is signed all of the text fields become ready only?
    Any assistance will be most appreciated.
    Thank you.

    You don't need any JavaScript to do this.
    In Designer you can setup the signature field in that way, that all fields will be locked after signing.
    Look here:
    http://forums.adobe.com/message/3121870?tstart=2

Maybe you are looking for

  • "Object reference not set to an instance of an object" when opening designer

    I have a Windows Forms project which was originally developed in Visual Studio 2010. I migrated the project to VS2013, and now every time I open the project's main form, the designer complains of a null reference. If I hit "Ignore and Continue", the

  • How do i unflatten an image in photoshop?

    i have already saved the file previously?

  • The WebLogic Server did not start up properly.

    Hi Everybody, I am quite new in BEA product, actually with weblogic integration. I get an issue when I tried to start Weblogic integration. I used Weblogic integration 8.5 on my Windows box and JDK 1.4. When I tried to start it I get the folowing err

  • How do I catch cancel dialogEvent from a popup?

    Guys and Gals, I was wondering about this myself and after doing a little googling and forum spelunking, thought I'd share what I came up with. Setup: <ol>Edit dialog inside of a popup. PopupCanceledListener and DialogListener defined</ol> Requiremen

  • Oracle 9i Release 2 Function Index

    Can somone please tell me if functional indices are available on the standard 9i version or the Enterprise version only? I know they are enterprise only on 8i and I'm hoping this changed to 9i Thank you John D