- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2016 08:52 AM
I am working on a UI Action that copies a record. Part of the process is to prompt the user if they want to include related records, in this case Outages. I have an IF statement built and working, but having trouble finding the right code to hide the ui_checkbox in the first case.
<j:if test="${!jvar_gr.hasNext()}">
<p>
<g:ui_checkbox name="attachments" id="attachments" value="false"/>
<label>Attachments</label>
</p>
</j:if>
<j:if test="${jvar_gr.next()}">
<p>
<g:ui_checkbox name="attachments" id="attachments" value="true"/>
<label>Attachments</label>
</p>
</j:if>
For line 3 - is there a tag/label I can add that makes the ui_checkbox hidden? It is setting the value correctly to true or false, but I want it to be completely hidden on false. Can't just omit it because I need to call it in the Processing Script, but I don't want the user to see it either.
I tried [display="false"] & [visible="false"] & [visibility="false"] but no luck. Appreciate any help you can provide!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2016 09:04 AM
<j:if test="${!jvar_gr.hasNext()}">
<p style="display:none">
<g:ui_checkbox name="attachments" id="attachments" value="false"/>
<label>Attachments</label>
</p>
</j:if>
<j:if test="${jvar_gr.next()}">
<p style="display:block">
<g:ui_checkbox name="attachments" id="attachments" value="true"/>
<label>Attachments</label>
</p>
</j:if>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2016 09:09 AM
Glad you got it working.