Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Livecycle ES2 - Blank Multi-lined Text Field Deleting Customer Input Data

Avatar

Level 2

Hello,

I am using a Java Script to add multiple lines to a blank text field.  If the customer types in the field the text replaces the lines.  If the customer just prints the form, them the lines remain.  The problem I am having is if the customer types in the field and then needs to go back and alter the text, the moment they tab or click on the text field in the for the text disappears.

I did not write this code, and I do not know how to get back in touch with the person that did.

DRF1.subform.Field_Name::initialize - (JavaScript, client)

this.rawValue = "\n________________________________\n\n________________________________\n\n________________________________\n\n________________________________\n";

DRF1.subform.Field_Name::enter - (JavaScript, client)

this.rawValue = null;

DRF1.subform.Field_Name::exit - (JavaScript, client)

if(this.rawValue == null)

{

this.rawValue = "\n________________________________\n\n________________________________\n\n________________________________\n\n________________________________\n";

}else{}

I am assuming I need to alter the "enter" value, but I am unsure as to how to alter it.  Your help is greatly appreciated!  I am no programer.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

I think you might be better of with another approach, with this approach the user will have the same trouble if they save the form and open it later.

Try change the initialise script to;

  

this.format.picture.value


= "null{________________________________\r\n________________________________\r\n________________________________\r\n________________________________}";


Then you will be able to remove the code in the enter and exit events totally.

The code above sets the null display pattern, which means it will only appear if the field has no value.  Normally you can enter this in the the display pattern dialog but that doesn't allow you to enter the carridge-return/line-feed characters.

Regards

Bruce

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

I think you might be better of with another approach, with this approach the user will have the same trouble if they save the form and open it later.

Try change the initialise script to;

  

this.format.picture.value


= "null{________________________________\r\n________________________________\r\n________________________________\r\n________________________________}";


Then you will be able to remove the code in the enter and exit events totally.

The code above sets the null display pattern, which means it will only appear if the field has no value.  Normally you can enter this in the the display pattern dialog but that doesn't allow you to enter the carridge-return/line-feed characters.

Regards

Bruce

Avatar

Level 2

That worked perfectly!  Thank you so much!