Search code examples
formsalfrescoalfresco-share

alfresco tag content on create


is it possible to display tag form during document (cm:content) creation in Alfresco 5.2 share ?

I've searched in share-form-config.xml for an example and I've not found an answer.

I've tried with

<config evaluator="model-type" condition="myco:myType">
<forms>
    <form>
        <field-visibility>

            <!-- ... -->

            <!-- tags and categories -->
            <show id="cm:taggable" for-mode="edit" force="true" />

            <!-- ... -->

        </field-visibility>
        <appearance>

            <!-- ... -->

            <field id="cm:taggable">
                <control>
                    <control-param name="compactMode">true</control-param>
                    <control-param name="params">aspect=cm:taggable</control-param>
                    <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                    <control-param name="createNewItemIcon">tag</control-param>
                </control>
            </field>

            <!-- ... -->

        </appearance>
    </form>
</forms>

but it works only during edit forms (with <config evaluator="node-type" condition="myco:myType">, not during creation.

SOLUTION

the previous code is right except for

<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true" />

which should be without the for-mode="edit" during creation of a document.


Solution

  • I can't tell what you are doing because you haven't included the enclosing "" element. If you want to change the form that exists for new nodes use the "model-type" evaluator, like:

    <config evaluator="model-type" condition="sc:whitepaper">
    

    The "node-type" evaluator is used for existing nodes.

    If that doesn't meet your requirements you might take a look at the Uploader Plus add-on.