As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi everyone,
How can I add reset button in workflow form which will clear all the fields on the form except one?
Thanks,
Yash
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>