Single Line Text Variable Char Limit

jmoore
Mega Expert

Hi,

Is there a way to globally set the max character limit for single line text variables in catalog items? I realize I can set a character limit in each individual variable.

And/or, is it possible to make the width of the single line text box wider/grow as a user enters more text in the catalog item and in the requested item (up to the char limit)?

We have a single line text box in multiple catalog items. If a user enters a long value, it is difficult to read in the requested item (user has to scroll to the right).

find_real_file.png

Thanks!

7 REPLIES 7

Hi Sarva,



For variables there is no limit. But if you want to restrict the character limit of the variable you need to do scripting a bit. You need to create a new Client Script onChange of the variable as of below:


if(newValue.length>8)


{


//do your logic


}



Please find the relevant helpful threads here:


1. Character limit on multi line text variable


2. variable length restriction and validation



I hope this helps.Please markcorrect/helpful based on impact


Thank You. This is the way we have currently.


Venkateswarlu K
Mega Guru

HI Jessica


For ur issue better to create this variable in variable sets that can be access globally across all the catalog items increase the Variable Width as 100%   and in another way better to select the variable type as a Multi line text this can shows the complete description in a box