cancel
Showing results for 
Search instead for 
Did you mean: 

Personas - Can we restrict Text box or Label field length?

0 Kudos

Hi,

Is there a way to restrict the field length of the custom Text Boxes or Labels on Personas.

We found 'Maxlength' as one of the properties of any custom Text box and Label, but it is greyed out to be able to edit.

Could anyone please help on this?

Regards,

Geetha

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Geetha,

No the maxlength is non-editable.

Well if you want restriction imposed for your end user, you will have to use javascript as part of your script actions.

Something like

if(args.yourVariable.length >5)

{  

}

Let me know if you need a running example.

Regards,

Sushant

0 Kudos

Thanks Sushant. We have been using the script way but just wondering if property settings could do that. May be in future releases.

Answers (1)

Answers (1)

0 Kudos

Hi Geetha,

You have to write script for this kind of validation, check the string length of the field value using if condition and do it accordingly.

eg. If strlen(field) less than or equal 10

    
         *******

      else

         msg type.......

      endif.