How to get 2 columns in the Advanced Search form in Alfresco 5 community?

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

How to get 2 columns in the Advanced Search form in Alfresco 5 community?

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='ProposalSmiley Very HappyateOfProposal' force='true' />
<show id='ProposalSmiley TongueroposalAmount' force='true' />
<show id='ProposalSmiley FrustratedkillsRequired' force='true' />
<show id='Proposal:ContractType' force='true' />
<show id='ProposalSmiley TongueroposedStartDate' force='true' />
<show id='ProposalSmiley TongueropsedEndDate' 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='ProposalSmiley Very HappyateOfProposal' force='true' />

<show id='ProposalSmiley TongueroposalAmount' force='true' />
<show id='ProposalSmiley FrustratedkillsRequired' force='true' />
<show id='Proposal:ContractType' force='true' />
<show id='ProposalSmiley TongueroposedStartDate' force='true' />
<show id='ProposalSmiley TongueropsedEndDate' 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='ProposalSmiley Very HappyateOfProposal'>
<control template='/org/alfresco/components/form/controls/daterange.ftl' />
</field>
<field id='ProposalSmiley TongueroposalAmount'>
<control template='/org/alfresco/components/form/controls/textfield.ftl' />
</field>
<field id='ProposalSmiley FrustratedkillsRequired'>
<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='ProposalSmiley TongueroposedStartDate'>
<control template='/org/alfresco/components/form/controls/daterange.ftl' />
</field>
<field id='ProposalSmiley TongueroposedEndDate'>
<control template='/org/alfresco/components/form/controls/daterange.ftl' />
</field>
</appearance>
</form>
</forms>
</config>

2 Replies
afaust
Master

Re: How to get 2 columns in the Advanced Search form in Alfresco 5 community?

Just look at another section of the documentation you have linked: Grouping fields

neilecker
Active Member II

Re: How to get 2 columns in the Advanced Search form in Alfresco 5 community?

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?