Hide dropdown items based on current value selected

Hey everyone, is there any way to hide drop down items based on current value selected on frontend?

For example if Lead status is new, we only want to allow user to select assigned.
If status is assigned, we only want to allow converted or dead.

I understand it could be done using javascript in suite7 but clueless on how to achieve it in suite8.

Any help :frowning:

Here you go:


Hi @sadiq-soomro

You can use the Global Hide Manager plugin for this functionality. It allows you to:

  • Encrypt fields from left to right/right to left (e.g., #####54687).
  • Hide values in list view, detail view, and edit view of SuiteCRM.
  • Hide or disable fields based on Element Class or Element ID.

Additionally, if you need any custom functionality , we can develop that for you as well. We also have some free products that might be beneficial for you. You can check them out here: Free SuiteCRM Plugins.

For more details about the Global Hide Manager, you can visit the product page: SuiteCRM Global Hide Manager.

@rsp for dynamic dropdown to work, we need to use more than one dropdowns - child and parent.

However I only want to use single dropdown and based on that I want to hide other options.

Currently we have following statuses:
New
Assigned
Converted
Dead

So if current status is assigned, new status should not be available in dropdown.

Any idea how to achieve this?

Well after hours of digging I found there is a component responsible for handling dropdowns.

/var/www/crm-setech/core/app/core/src/lib/fields/base/base-enum.component.ts
If I open the edit view of Leads, buildOptionsArray is responsible for getting the enums and initValueLabel is the method which populates the selected value.

I will try to extend this component and see what i can achieve.