Custom advanced search, blank dropdowns by default

cancel
Showing results for 
Search instead for 
Did you mean: 
davidzuluaga5
Member II

Custom advanced search, blank dropdowns by default

Hi! I have an advanced search and currently I have a limitation: the dropdowns select always a value by default. I need that the dropdown values are not included if users does not select a value manually. So it should be a blank or something similar by default.

Could someone point me in the right direction? thanks.

3 Replies
abhinavmishra14
Advanced

Re: Custom advanced search, blank dropdowns by default

 


@davidzuluaga5 wrote:

Hi! I have an advanced search and currently I have a limitation: the dropdowns select always a value by default. I need that the dropdown values are not included if users does not select a value manually. So it should be a blank or something similar by default.

Could someone point me in the right direction? thanks.



Checkout the solutions here: https://hub.alfresco.com/t5/alfresco-content-services-forum/share-customization-could-not-make-the-a...

Two possible solutions:

1- You can use a custom form template for that property that will display all the values along with default blank

2- Add the "" (empty) in constraint list used for a property defined in your content model.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
sanjaybandhniya
Intermediate

Re: Custom advanced search, blank dropdowns by default

I have a same use case where I need to add blank or empty string as first option so user can have a choice to select or not.

But in advance search I want to select all document if user select blank, will this work with above solution?

abhinavmishra14
Advanced

Re: Custom advanced search, blank dropdowns by default


@sanjaybandhniya wrote:

I have a same use case where I need to add blank or empty string as first option so user can have a choice to select or not.

But in advance search I want to select all document if user select blank, will this work with above solution?


That is not something template/setting blank would handle. It has be to and update in search query. Also you can extend the search library to add an additonal check when blank is selected do the required search as per your requirement.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)