ACSCE-5X practice question 4 of 15

What are the minimum steps needed to add a custom search form in Alfresco Share?

Full set: 87 questions
Answer options
A: Define your form using Share form configuration and add the definition to the ‘AdvancedSearch’ configuration section in share-config-custom.xml Correct answer
B: Define your form mark-up in a FreeMarker file, add the definition to the ‘AdvancedSearch’ configuration section in share-config-custom.xml, and provide a web script to handle search requests.
C: Define your form mark-up in a FreeMarker file and add the definition to the ‘AdvancedSearch’ configuration section in share-config-custom.xml
D: Define a web script to render the form, a web script to handle search requests, and add the definitions to the ‘AdvancedSearch’ configuration section in share-config-custom.xml
Correct Answer:
A. Define your form using Share form configuration and add the definition to the ‘AdvancedSearch’ configuration section in share-config-custom.xml
Explanation

The Alfresco Share framework is designed to be highly configurable through XML. The most direct and minimal method for adding a custom search form is to use the declarative Share Forms configuration. This involves defining the form's fields and appearance within a element in share-config-custom.xml. This new form definition is then registered by adding it to the list of available forms within the section. This approach leverages the built-in form rendering engine and search components, avoiding the need for custom FreeMarker templates or new web scripts for a standard implementation.

Why Incorrect

B: This is incorrect because providing a custom web script to handle the search request is not a minimum requirement; the existing search framework can handle forms defined declaratively. C: This is incorrect because defining the form markup in a FreeMarker file is not the simplest method. The declarative Share form configuration is the intended minimal approach. D: This is incorrect as it represents the most complex approach, requiring two new web scripts. This is unnecessary for adding a standard custom search form.

References

1. Alfresco Content Services 5.2 Documentation, "Customizing the Advanced Search form": This official guide details the process. It states, "You can customize the Advanced Search form by editing the share-config-custom.xml file." The example provided shows defining a new element and then adding it to the list under the AdvancedSearch configuration section, confirming that only XML configuration is needed.

Source: Alfresco Documentation Server, docs.alfresco.com/5.2/concepts/share-advsearch-custom.html

2. Alfresco Content Services 5.2 Documentation, "Share Forms": This document explains the declarative nature of the Share Forms engine. It describes how to define form controls, layout, and visibility entirely within the XML configuration, which is the foundation of the process described in the correct answer.

Source: Alfresco Documentation Server, docs.alfresco.com/5.2/concepts/share-forms-config.html

Scroll to Top