cancel
Showing results for 
Search instead for 
Did you mean: 

Limit drop down options

Limit drop down options

How to limit the number of options in the drop-down in front-end which is based on the value that is chosen by the admin in back-end for a drop-down which having options as 'single' and 'Multiple'. When admin choose option 'Single' and save a product from back-end , only one drop-down value is there in front-end for a custom drop-down. How to do that? Any idea? Any link for referal ?

1 REPLY 1

Re: Limit drop down options

@aashik_nr on frontend where you are generating the options just check the value of that lmit attribute.

 

If its value is "Single" only show the first element of option array else show all the elements using foreach loop.

 

Thanks