Hi,
Is there an option to add the "forceSelection" field for the tagfield resourceType through the Metadata Schema from UI end?
This is how it should appear for the tagfield in the crx/de backend.
- Anish
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @anish11,
This is possible, here are detailed instructions:
<%
boolean forceSelection = cfg.get("forceSelection", false);
String forceSelectionChecked = forceSelection ? "checked" : "";
%>
<input handle="input" type="checkbox" name="<%= xssAPI.encodeForHTMLAttr("./items/" + key + "/forceSelection") %>" value="true" <%= forceSelectionChecked %>/>
<input type="hidden" name="<%= xssAPI.encodeForHTMLAttr("./items/" + key + "/forceSelection@TypeHint") %>" value="Boolean"/>
<label for="forceSelection">Force Selection</label><br>
The result will look like this:
Additionally you can experiment with styling to make it look like other checkboxes.
Hi @anish11,
This is possible, here are detailed instructions:
<%
boolean forceSelection = cfg.get("forceSelection", false);
String forceSelectionChecked = forceSelection ? "checked" : "";
%>
<input handle="input" type="checkbox" name="<%= xssAPI.encodeForHTMLAttr("./items/" + key + "/forceSelection") %>" value="true" <%= forceSelectionChecked %>/>
<input type="hidden" name="<%= xssAPI.encodeForHTMLAttr("./items/" + key + "/forceSelection@TypeHint") %>" value="Boolean"/>
<label for="forceSelection">Force Selection</label><br>
The result will look like this:
Additionally you can experiment with styling to make it look like other checkboxes.
Views
Likes
Replies