Deleted.

cancel
Showing results for 
Search instead for 
Did you mean: 
anon26949
Established Member
1 Solution

Accepted Solutions
krutik_jayswal
Senior Member II

Re: How to properly configure the form for editing metadata?

Jump to solution

There are few things which needs to be considered, which you need to understand.

 

<config > Element

There are two attributed in config element. 

First is evaluator.If eveluator attribute is set to model-type, this means particular form configured inside this configuration will be opened when the type of object is created.Which mean form is opened in create mode(There is attribute called form.mode which should be create)

Second is condition, which is used for identification of type or object which is defined inside the content model.

There is one more form which can be configured by giving id in the <form> tag.If you give doclib-simple-metadata,then it will open that form in edit properties dialogue.

How to create custom form field in share

While creating custom form control,Inside the ftl file, You need to define an if..else condition for rendering the field in view mode and rendering it in edit mode.If you refer existing textfield.ftl or any other control , inside that there are sections for rendering field in view mode which is your property pane and edit mode, which is edit properties form.

In ftl this can be implemented like below

 <#if form.mode == "view">

//Code for viewing field value

<#else>

//Code for editing field value

</#if>

View solution in original post

2 Replies
anon26949
Established Member

Deleted.

Jump to solution

Deleted.

krutik_jayswal
Senior Member II

Re: How to properly configure the form for editing metadata?

Jump to solution

There are few things which needs to be considered, which you need to understand.

 

<config > Element

There are two attributed in config element. 

First is evaluator.If eveluator attribute is set to model-type, this means particular form configured inside this configuration will be opened when the type of object is created.Which mean form is opened in create mode(There is attribute called form.mode which should be create)

Second is condition, which is used for identification of type or object which is defined inside the content model.

There is one more form which can be configured by giving id in the <form> tag.If you give doclib-simple-metadata,then it will open that form in edit properties dialogue.

How to create custom form field in share

While creating custom form control,Inside the ftl file, You need to define an if..else condition for rendering the field in view mode and rendering it in edit mode.If you refer existing textfield.ftl or any other control , inside that there are sections for rendering field in view mode which is your property pane and edit mode, which is edit properties form.

In ftl this can be implemented like below

 <#if form.mode == "view">

//Code for viewing field value

<#else>

//Code for editing field value

</#if>