Make the Quantity in SC read only

Rairai31
Giga Guru

Hi,

How to make the quantity reads only? (Users should not be able to edit the quantity)

Rairai31_0-1719451394811.png

The goal is to be able to display the Quantity = 1 once the request has been submitted. 

Rairai31_1-1719451533893.png

Making the quantity hidden on the configuration, makes the quantity = -- once the request has been submitted. We wanted to show the Quantity = 1 once the request is submitted. Thank you.

 

 

3 REPLIES 3

Zack Hilacan1
Mega Sage

Hello @Rairai31 ,

 

I'm assuming end users will be ordering this, so either they don't have a role or less roles. Maybe you can just restrict who can use the quantity selector, in that case you don't need to clone and customize the actual widget and just modify this Property. "glide.sc.allow.quantity"

ZackHilacan1_0-1719455786644.png

Just input the roles in the value for those who can use the "Quantity" field in the catalog item.

ZackHilacan1_2-1719456039986.png

 

From the point of view from the user it will be hidden but upon submitting the Quantity field will show as "1".

ZackHilacan1_1-1719456023763.png

 

 

If this has been of any help, please mark as helpful and solution. This will help others who have the same concern.

Thanks!

Zack

 

Hi @Zack Hilacan1,

 

That is wonderful solution. But will this apply to all catalog items instead only to that specific catalog item we wanted the quantity to be read only? We wanted to make the quantity read only only to a specific catalog item. Thank you.

Yes, sorry that would apply to all catalog items. For now what I can think of is Dom manipulation. Or Create a clone of that widget and make sure to put a condition in the widget that it will be read-only for that current Item.