How to add Reset button in Alfresco workflow form

cancel
Showing results for 
Search instead for 
Did you mean: 
yash_patel_c2
Established Member

How to add Reset button in Alfresco workflow form

Hi everyone,

How can I add reset button in workflow form which will clear all the fields on the form except one?

Thanks,

Yash

1 Reply
krutik_jayswal
Senior Member II

Re: How to add Reset button in Alfresco workflow form

One way will be to extend form.get.html.ftl,this file is responsible for rendering all form in alfresco share.Form related to content as well are rendered using this file.So any change you make in this file will reflect in all forms.You can add condition like if it is workflow form then and then only you need to make reset button visible.

This template is importing one more template named as form.lib.ftl which is responsible for rendering the form buttons.Below is the same macro where you need to add button.

<#macro renderFormButtons formId>
<div id="${formId}-buttons" class="form-buttons">
<#if form.showSubmitButton?? && form.showSubmitButton>
<input id="${formId}-submit" type="submit" value="${msg("form.button.submit.label")}" /> 
</#if>
<#if form.showResetButton?? && form.showResetButton>
<input id="${formId}-reset" type="reset" value="${msg("form.button.reset.label")}" /> 
</#if>
<#if form.showCancelButton?? && form.showCancelButton>
<input id="${formId}-cancel" type="button" value="${msg("form.button.cancel.label")}" />
</#if>
</div>
</#macro>