Prefix a Catalog Variable

somujit
Tera Contributor

Hello Experts,

I have a requirement wherein i need to prefix a Variable value and also allow the requestor to fill the rest of the value for the same variable.

For example, I have defined a variable to enter the Model Number of Windows desktop and the variable value would be "WINxxxxx", wherein WIN should be the prefix to be displayed by default and xxxx is to be filled by the requestor prior placing the order

find_real_file.png

Suggestions on achieving the same much appreciated..TIA

6 REPLIES 6

bardakov
Tera Expert

You can create Client script

a few examples:

onLoad client script: set prefix to variable


onChange client script: concatenate a string with prefixes when data is entered

onSubmit client script: concatenate a string with prefixes when form in submited

Omkar Mone
Mega Sage

Hi 

Set the Default value of that variable to the prefix you wish to set.

 

Mark Correct if it helps.

 

Regards,

Omkar Mone

www.dxsherpa.com

 

 

 

 

 

sam352120
Kilo Guru

Hi Soumajit,

 

That field can be a text field and you can set the default value as WIN(static value to be displayed by default as per your requiremnt).

Then the users will be allowed to fill the rest as per the business requiremnt.

Please do let me know if it helps or fullfill your requiremnt.

 

 

Thanks,

Sambit

 

 

Hello Sambit,

In the approach suggested by you, the requestor can modify the default value too.

Any suggestions on if i can make the default value non editable

TIA..