1 Reply Latest reply: Nov 3, 2014 6:50 PM by lateniteNC RSS

    Default LiveCycle text to disappear

    littletinktink Community Member

      I need to add instructional default text to a text field and have it disappear when the cursor is clicked into that field, but have it reappear if nothing is entered in the field

        • 1. Re: Default LiveCycle text to disappear
          lateniteNC Community Member

          Try this. Open the script window and add the following:

           

          (1)  In the initialize event of the field, add the following javascript:

           

          this.execEvent("exit");

                      this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";

           

           

          (2) In the enter* event of the field, add the following javascript:

           

          this.fontColor = "0,0,0";

                      this.font.posture = "normal";

           

          (3) In the exit* event of the field, add the following javascript:

           

          if (this.isNull){

                      this.fontColor = "153,153,153";

                      this.font.posture = "italic";

                      this.caption.font.fill.color.value = "0,0,0";

                      this.caption.font.posture = "normal";

             

          Once that is entered, go to the object palette, and select the Accessibility tab. In the tool tip field, type in the guidance you want to provide the user in filling out this field. Preview the form and see if that helps.

           

          rg