I want to hide few fields in grails create.gsp file for a table. I cannot use column display false constraint because I want the field to be visible in index page table view.
By default the code for create.gsp contains the following:
<g:form resource="${this.tablename}" method="POST">
<fieldset class="form">
<f:all bean="tablename"/>
</fieldset>
<fieldset class="buttons">
<g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" />
</fieldset>
</g:form>
How do I skip some specific 2-3 fields in <f:all bean = "tablename"/> part of code?
You can exclude attributes using the
exceptattribute of the tag which accepts a comma-separated list of properties that should be skipped.See https://grails-fields-plugin.github.io/grails-fields/latest/ref/Tags/all.html for more info.