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>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.