03-21-2017 04:40 PM
I am trying to have my search options listed in two or three columns in the advanced search menu with custom fields. The following does work for a single column layout. The two commented lines are what I believe should modify the form to be two columns after following the directions here: Providing a custom form template | Alfresco Documentation
When I restart the server and open the advanced search I only have the keyword search field.
I am new to Alfresco I pieced all off this together from other posts. Please let me know what I am doing wrong.
<config replace='true' evaluator='string-compare' condition='AdvancedSearch'>
<advanced-search>
<forms>
<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>
</forms>
</advanced-search>
</config>
<config evaluator='model-type' condition='cm:content'>
<forms>
<form id='doclib-common'>
<!-- <edit-form template='/2-column-edit-form.ftl' /> -->
<field-visibility>
<show id='cm:name' />
<show id='cm:title' force='true' />
<show id='cm:description' force='true' />
<show id='Proposal:TypeOfWork' force='true' />
<show id='Proposal:Client' force='true' />
<show id='ProposalateOfProposal' force='true' />
<show id='ProposalroposalAmount' force='true' />
<show id='ProposalkillsRequired' force='true' />
<show id='Proposal:ContractType' force='true' />
<show id='ProposalroposedStartDate' force='true' />
<show id='ProposalropsedEndDate' force='true' />
</field-visibility>
<create-form template='../documentlibrary/forms/doclib-common.ftl' />
<appearance>
<field id='cm:title'>
<control template='/org/alfresco/components/form/controls/textfield.ftl' />
</field>
</appearance>
</form>
<form id='search'>
<!-- <edit-form template='/2-column-edit-form.ftl' /> -->
<field-visibility>
<show id='cm:name' />
<show id='cm:title' force='true' />
<show id='cm:description' force='true' />
<show id='Proposal:TypeOfWork' force='true' />
<show id='Proposal:Client' force='true' />
<show id='ProposalateOfProposal' force='true' />
<show id='ProposalroposalAmount' force='true' />
<show id='ProposalkillsRequired' force='true' />
<show id='Proposal:ContractType' force='true' />
<show id='ProposalroposedStartDate' force='true' />
<show id='ProposalropsedEndDate' force='true' />
</field-visibility>
<appearance>
<field id='cm:title'>
<control template='/org/alfresco/components/form/controls/textfield.ftl' />
</field>
<field id='Proposal:TypeOfWork'>
<control template='/org/alfresco/components/form/controls/selectmany.ftl' />
</field>
<field id='Proposal:Client'>
<control template='/org/alfresco/components/form/controls/textfield.ftl' />
</field>
<field id='ProposalateOfProposal'>
<control template='/org/alfresco/components/form/controls/daterange.ftl' />
</field>
<field id='ProposalroposalAmount'>
<control template='/org/alfresco/components/form/controls/textfield.ftl' />
</field>
<field id='ProposalkillsRequired'>
<control template='/org/alfresco/components/form/controls/selectmany.ftl' />
</field>
<field id='Proposal:ContractType'>
<control template='/org/alfresco/components/form/controls/selectmany.ftl' />
</field>
<field id='ProposalroposedStartDate'>
<control template='/org/alfresco/components/form/controls/daterange.ftl' />
</field>
<field id='ProposalroposedEndDate'>
<control template='/org/alfresco/components/form/controls/daterange.ftl' />
</field>
</appearance>
</form>
</forms>
</config>
03-21-2017 07:15 PM
Just look at another section of the documentation you have linked: Grouping fields
04-20-2017 03:23 PM
I'm in the same boat. I have a number of custom Advanced search forms, a couple of which have quite a few fields and would benefit from being divided into columns. I'm already using sets as described in the Grouping Fields link Axel mentioned but if I try to include a template "<edit-form template='/2-column-edit-form.ftl' />" the form no longer works with only the keyword search being available.
It's unclear to me from the documentation if the 2-column-edit-form.ftl file is something that is already available or if it is something that I need to create. If I need to create my own, where does it need to be placed?
Explore our Alfresco products with the links below. Use labels to filter content by product module.