cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing a text field in Adobe form after validation

Former Member
0 Kudos

Hi experts,

I am entering a wrong text in my date field,after validating i want clear the date field.How i can code this?

Please help me and guide me.

Regards,

Arun.

Accepted Solutions (1)

Accepted Solutions (1)

former_member389677
Active Participant
0 Kudos

Hi Arun,

Write the validation in the exit event of the field like this.

if(this.rawValue == this.formattedValue){

this.rawValue = "";

xfa.host.messageBox("Please enter date in 'MM/DD/YYYY' format.");

}

You need to Edit pattern in the object Paletts as 'MM/DD/YYYY'.

Hopes this will help you.

Regards,

Shaira.

Edited by: Shaira Madhu on Nov 22, 2011 10:05 AM

Former Member
0 Kudos

Hi Shaira,

Thanks a lot...It is working fine..

Regards,

Arun.

Answers (0)