hide the selection list

Shir Sharvit
Tera Contributor

Hey.

 

How can I hide the selection list of the service offer field, the intention is not to hide the entire field from the form, I want the field to still appear in the form, but as soon as I click on the magnifying glass on the right, The selection list that opens will be empty with no values.
The selection list of the field for which I want to hide the values will only appear if the service field (business_service) is full. And it will display only the values whose parent field is the same as the parent field of the service field (business_service)

 

WhatsApp Image 2023-11-20 at 09.17.59.jpg

 

The service offering field is of type:

ShirSharvit_1-1700465362754.png

 

 

 

Currently, part of the requirement works as soon as a value is selected in the service field, then the selection list in the service offering field will only say the values whose parent is the same


I am attaching the method and the existing code In the dictionary tab of that field:

WhatsApp Image 2023-11-20 at 09.25.26.jpeg

 

I need to add my requirement to that line of code

 

Thank. Shir

 

 

 

 

 

 

1 REPLY 1

-O-
Kilo Patron
Kilo Patron

Changing the reference qualifier to

 

javascript: 'parentISNOTEMPTY^parent=' + current.business_service;

 

should do it.

In case no business service is selected, nothing will show in the pick list (the 1st part of the query eliminates those Offerings that might have no parent and thus would satisfy the parent == '' criteria), if a Service is selected only Offerings of that service will show up.

 

Note that the site replaces the colon after the JavaScript keyword javascript with the HTML entity equivalent, so don't mind that.