AnsweredAssumed Answered

Want to hide some fields from advance search form

Question asked by shashank.tyagi on Aug 21, 2018
Latest reply on Aug 22, 2018 by shashank.tyagi



I have created a customModel and using this custom model to customise advance search.


my customModel.xml:



<?xml version="1.0" encoding="UTF-8"?>

<!-- Custom Model -->

<!-- Note: This model is pre-configured to load at startup of the Repository. So, all custom -->
<!-- types and aspects added here will automatically be registered -->

<model name="custom:customModel" xmlns="">

<!-- Optional meta-data about the model -->
<description>Custom Model</description>

<!-- Import Alfresco Dictionary Definitions -->
<import uri="" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="" prefix="cm"/>

<!-- Introduction of new namespaces defined by this model -->
<!-- NOTE: The following namespace custom.model should be changed to reflect your own namespace -->
<namespace uri="custom.model" prefix="custom"/>
<constraint name="custom:productListConstraint" type="LIST">
<parameter name="allowedValues">


<type name="custom:protocollazione">
<type name="custom:marketingDoc">
<title>MyCompany Marketing Document</title>
<property name="custom:smartSearch">
<constraint ref="custom:productListConstraint" />
<type name="custom:white">
<title>MyCompany Whitepaper</title>


<aspect name="custom:numP">
<title>Numero Protocollazione</title>
<property name="custom:numeroP">




and my custom-model-context.xml:




<?xml version='1.0' encoding='UTF-8'?>


<!-- Registration of new models -->
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">



In share-config i added the form label smart search:


<config evaluator="string-compare" condition="AdvancedSearch">
<!-- Forms for the advanced search type list -->
The 'form' config element contains the name of the model type
of the form to display.

The element supports the following optional attributes:
id = form id, the id of "search" will be assumed if not set
label = label text to display - defaults to model type if not set
labelId = I18N message id of label text to display
description = description text to display
descriptionId = I18N message id of description text to display
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
<form label="smart search" description="search document by matadata">custom:white</form>


Below is the screenshot of my customised advanced search:


 My requirement is to hide other fields except custom:smartSearch.


In this smart search form custom:smartSearch field is visible. My requirement is- I need only custom:smartSearch field and hide other fields i.e Created Date, Creator, Name, Locale, Modifier, etc.

I don't know how to hide these fields


Can anyone help me to hide Created Date, Creator, Name, Locale, Modifier, etc. fields except custom:smartSearch