サブフォーム
list フィールド、yaml フィールド、ウィザードのページで使う、再利用可能なフォームの断片
サブフォームは、再利用可能なフォームの断片です。タイル表示には表示されず、直接送信することもできません。代わりに、次のものから参照されます。
listフィールド: 各行のドリルダウンエディターとしてサブフォームを開きますsubformプロパティを持つyamlフィールド: 1 つのオブジェクトのドリルダウンエディターとしてサブフォームを開きますwizardのステップ: サブフォームをウィザードの 1 ページとして表示します
A reusable form fragment used as the per-row editor of a list field, or as the single-object editor of a yaml field with the subform property.
Subforms are not shown in the tile view and cannot be submitted directly.
They share the same field types and validation rules as regular forms.
Address subform
- name: Address
type: subform
fields:
- name: street
type: text
label: Street
required: true
- name: city
type: text
label: City
required: true
- name: country
type: text
label: Country
required: true
- name: My Main Form
type: ansible
playbook: site.yml
roles:
- default
fields:
- name: addresses
type: list
label: Addresses
subform: Addressプロパティ
サブフォームには 種類に固有のプロパティはありません。 フォームの共通プロパティ である name、 description、 help、 type、 fields だけを使います。
サブフォームをウィザードのページとして使う場合、その description と help がステップの title と help の既定値になります。 showHelp を設定して、ページの読み込み時にそのヘルプを展開することもできます。
実行に関するプロパティ ( playbook、 template、 roles、 inventory など) は、サブフォームには適用されません。サブフォームが直接送信されることはないためです。