特定のフィールドを検索可能にする
最終更新日: 2025年3月27日
- 適用対象:
- Experience Manager 6.5
- トピック:
- アダプティブフォーム
作成対象:
- 経験者
- 開発者
フォームの検索可能なフィールドは、通常、送信されたデータの検索やフィルタリングの条件として使用できる、フォーム内のフィールドを指します。
このユースケースの目的で、次のフィールドタイプが拡張され、検索可能になりました。
- checkboxgroup
- ドロップダウン
- ラジオボタン
フォーム作成者は、以下に示すように、これらのフィールドタイプを検索可能としてマークできます
フィールドは、次の構造を作成して拡張されました
次に、.content.xml ファイルの内容を示します。
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Check box group"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<tabs
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs"
maximized="{Boolean}false">
<items jcr:primaryType="nt:unstructured">
<properties
jcr:primaryType="nt:unstructured"
jcr:title="Additional Properties"
sling:resourceType="granite/ui/components/coral/foundation/container"
margin="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<columns
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"
margin="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<Searchable
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
emptyText="Want to include in search?"
fieldDescription="Indicate if you want to use in search"
text="Want to use this field in query"
value="{Boolean}true"
uncheckedValue="{Boolean}false"
name="./Searchable"
checked="{Boolean}false"
required="{Boolean}false"/>
</items>
</column>
</items>
</columns>
</items>
</properties>
</items>
</tabs>
</items>
</content>
</jcr:root>