@@ -170,91 +170,91 @@ The following code sample shows configuration of the `custom-checkout-form-conta
170
170
``` xml
171
171
...
172
172
<item name =" custom-checkout-form-container" xsi : type =" array" >
173
- ...
174
- <item name =" children" xsi : type =" array" >
175
- <item name =" custom-checkout-form-fieldset" xsi : type =" array" >
176
- <!-- uiComponent is used as a wrapper for form fields (its template will render all children as a list) -->
177
- <item name =" component" xsi : type =" string" >uiComponent</item >
178
- <!-- the following display area is used in template (see below) -->
179
- <item name =" displayArea" xsi : type =" string" >custom-checkout-form-fields</item >
180
- <item name =" children" xsi : type =" array" >
181
- <item name =" text_field" xsi : type =" array" >
182
- <item name =" component" xsi : type =" string" >Magento_Ui/js/form/element/abstract</item >
183
- <item name =" config" xsi : type =" array" >
184
- <!-- customScope is used to group elements within a single form (e.g. they can be validated separately) -->
185
- <item name =" customScope" xsi : type =" string" >customCheckoutForm</item >
186
- <item name =" template" xsi : type =" string" >ui/form/field</item >
187
- <item name =" elementTmpl" xsi : type =" string" >ui/form/element/input</item >
188
- </item >
189
- <item name =" provider" xsi : type =" string" >checkoutProvider</item >
190
- <item name =" dataScope" xsi : type =" string" >customCheckoutForm.text_field</item >
191
- <item name =" label" xsi : type =" string" translate =" true" >Text Field</item >
192
- <item name =" sortOrder" xsi : type =" string" >1</item >
193
- <item name =" validation" xsi : type =" array" >
194
- <item name =" required-entry" xsi : type =" string" >true</item >
195
- </item >
196
- </item >
197
- <item name =" checkbox_field" xsi : type =" array" >
198
- <item name =" component" xsi : type =" string" >Magento_Ui/js/form/element/boolean</item >
199
- <item name =" config" xsi : type =" array" >
200
- <!-- customScope is used to group elements within a single form (e.g. they can be validated separately)-->
201
- <item name =" customScope" xsi : type =" string" >customCheckoutForm</item >
202
- <item name =" template" xsi : type =" string" >ui/form/field</item >
203
- <item name =" elementTmpl" xsi : type =" string" >ui/form/element/checkbox</item >
204
- </item >
205
- <item name =" provider" xsi : type =" string" >checkoutProvider</item >
206
- <item name =" dataScope" xsi : type =" string" >customCheckoutForm.checkbox_field</item >
207
- <item name =" label" xsi : type =" string" translate =" true" >Checkbox Field</item >
208
- <item name =" sortOrder" xsi : type =" string" >3</item >
209
- </item >
210
- <item name =" select_field" xsi : type =" array" >
211
- <item name =" component" xsi : type =" string" >Magento_Ui/js/form/element/select</item >
212
- <item name =" config" xsi : type =" array" >
213
- <!-- customScope is used to group elements within a single form (e.g. they can be validated separately)-->
214
- <item name =" customScope" xsi : type =" string" >customCheckoutForm</item >
215
- <item name =" template" xsi : type =" string" >ui/form/field</item >
216
- <item name =" elementTmpl" xsi : type =" string" >ui/form/element/select</item >
217
- </item >
218
- <item name =" options" xsi : type =" array" >
219
- <item name =" 0" xsi : type =" array" >
220
- <item name =" label" xsi : type =" string" translate =" true" >Please select value</item >
221
- <item name =" value" xsi : type =" string" ></item >
173
+ ...
174
+ <item name =" children" xsi : type =" array" >
175
+ <item name =" custom-checkout-form-fieldset" xsi : type =" array" >
176
+ <!-- uiComponent is used as a wrapper for form fields (its template will render all children as a list) -->
177
+ <item name =" component" xsi : type =" string" >uiComponent</item >
178
+ <!-- the following display area is used in template (see below) -->
179
+ <item name =" displayArea" xsi : type =" string" >custom-checkout-form-fields</item >
180
+ <item name =" children" xsi : type =" array" >
181
+ <item name =" text_field" xsi : type =" array" >
182
+ <item name =" component" xsi : type =" string" >Magento_Ui/js/form/element/abstract</item >
183
+ <item name =" config" xsi : type =" array" >
184
+ <!-- customScope is used to group elements within a single form (e.g. they can be validated separately) -->
185
+ <item name =" customScope" xsi : type =" string" >customCheckoutForm</item >
186
+ <item name =" template" xsi : type =" string" >ui/form/field</item >
187
+ <item name =" elementTmpl" xsi : type =" string" >ui/form/element/input</item >
222
188
</item >
223
- <item name =" 1" xsi : type =" array" >
224
- <item name =" label" xsi : type =" string" translate =" true" >Value 1</item >
225
- <item name =" value" xsi : type =" string" >value_1</item >
189
+ <item name =" provider" xsi : type =" string" >checkoutProvider</item >
190
+ <item name =" dataScope" xsi : type =" string" >customCheckoutForm.text_field</item >
191
+ <item name =" label" xsi : type =" string" translate =" true" >Text Field</item >
192
+ <item name =" sortOrder" xsi : type =" string" >1</item >
193
+ <item name =" validation" xsi : type =" array" >
194
+ <item name =" required-entry" xsi : type =" string" >true</item >
226
195
</item >
227
- <item name =" 2" xsi : type =" array" >
228
- <item name =" label" xsi : type =" string" translate =" true" >Value 2</item >
229
- <item name =" value" xsi : type =" string" >value_2</item >
196
+ </item >
197
+ <item name =" checkbox_field" xsi : type =" array" >
198
+ <item name =" component" xsi : type =" string" >Magento_Ui/js/form/element/boolean</item >
199
+ <item name =" config" xsi : type =" array" >
200
+ <!-- customScope is used to group elements within a single form (e.g. they can be validated separately)-->
201
+ <item name =" customScope" xsi : type =" string" >customCheckoutForm</item >
202
+ <item name =" template" xsi : type =" string" >ui/form/field</item >
203
+ <item name =" elementTmpl" xsi : type =" string" >ui/form/element/checkbox</item >
230
204
</item >
205
+ <item name =" provider" xsi : type =" string" >checkoutProvider</item >
206
+ <item name =" dataScope" xsi : type =" string" >customCheckoutForm.checkbox_field</item >
207
+ <item name =" label" xsi : type =" string" translate =" true" >Checkbox Field</item >
208
+ <item name =" sortOrder" xsi : type =" string" >3</item >
231
209
</item >
232
- <!-- value element allows to specify default value of the form field -->
233
- <item name =" value" xsi : type =" string" >value_2</item >
234
- <item name =" provider" xsi : type =" string" >checkoutProvider</item >
235
- <item name =" dataScope" xsi : type =" string" >customCheckoutForm.select_field</item >
236
- <item name =" label" xsi : type =" string" translate =" true" >Select Field</item >
237
- <item name =" sortOrder" xsi : type =" string" >2</item >
238
- </item >
239
- <item name =" date_field" xsi : type =" array" >
240
- <item name =" component" xsi : type =" string" >Magento_Ui/js/form/element/date</item >
241
- <item name =" config" xsi : type =" array" >
242
- <!-- customScope is used to group elements within a single form (e.g. they can be validated separately)-->
243
- <item name =" customScope" xsi : type =" string" >customCheckoutForm</item >
244
- <item name =" template" xsi : type =" string" >ui/form/field</item >
245
- <item name =" elementTmpl" xsi : type =" string" >ui/form/element/date</item >
210
+ <item name =" select_field" xsi : type =" array" >
211
+ <item name =" component" xsi : type =" string" >Magento_Ui/js/form/element/select</item >
212
+ <item name =" config" xsi : type =" array" >
213
+ <!-- customScope is used to group elements within a single form (e.g. they can be validated separately)-->
214
+ <item name =" customScope" xsi : type =" string" >customCheckoutForm</item >
215
+ <item name =" template" xsi : type =" string" >ui/form/field</item >
216
+ <item name =" elementTmpl" xsi : type =" string" >ui/form/element/select</item >
217
+ </item >
218
+ <item name =" options" xsi : type =" array" >
219
+ <item name =" 0" xsi : type =" array" >
220
+ <item name =" label" xsi : type =" string" translate =" true" >Please select value</item >
221
+ <item name =" value" xsi : type =" string" ></item >
222
+ </item >
223
+ <item name =" 1" xsi : type =" array" >
224
+ <item name =" label" xsi : type =" string" translate =" true" >Value 1</item >
225
+ <item name =" value" xsi : type =" string" >value_1</item >
226
+ </item >
227
+ <item name =" 2" xsi : type =" array" >
228
+ <item name =" label" xsi : type =" string" translate =" true" >Value 2</item >
229
+ <item name =" value" xsi : type =" string" >value_2</item >
230
+ </item >
231
+ </item >
232
+ <!-- value element allows to specify default value of the form field -->
233
+ <item name =" value" xsi : type =" string" >value_2</item >
234
+ <item name =" provider" xsi : type =" string" >checkoutProvider</item >
235
+ <item name =" dataScope" xsi : type =" string" >customCheckoutForm.select_field</item >
236
+ <item name =" label" xsi : type =" string" translate =" true" >Select Field</item >
237
+ <item name =" sortOrder" xsi : type =" string" >2</item >
246
238
</item >
247
- <item name =" provider" xsi : type =" string" >checkoutProvider</item >
248
- <item name =" dataScope" xsi : type =" string" >customCheckoutForm.date_field</item >
249
- <item name =" label" xsi : type =" string" translate =" true" >Date Field</item >
250
- <item name =" validation" xsi : type =" array" >
251
- <item name =" required-entry" xsi : type =" string" >true</item >
239
+ <item name =" date_field" xsi : type =" array" >
240
+ <item name =" component" xsi : type =" string" >Magento_Ui/js/form/element/date</item >
241
+ <item name =" config" xsi : type =" array" >
242
+ <!-- customScope is used to group elements within a single form (e.g. they can be validated separately)-->
243
+ <item name =" customScope" xsi : type =" string" >customCheckoutForm</item >
244
+ <item name =" template" xsi : type =" string" >ui/form/field</item >
245
+ <item name =" elementTmpl" xsi : type =" string" >ui/form/element/date</item >
246
+ </item >
247
+ <item name =" provider" xsi : type =" string" >checkoutProvider</item >
248
+ <item name =" dataScope" xsi : type =" string" >customCheckoutForm.date_field</item >
249
+ <item name =" label" xsi : type =" string" translate =" true" >Date Field</item >
250
+ <item name =" validation" xsi : type =" array" >
251
+ <item name =" required-entry" xsi : type =" string" >true</item >
252
+ </item >
252
253
</item >
253
254
</item >
254
255
</item >
255
256
</item >
256
257
</item >
257
- </item >
258
258
...
259
259
```
260
260
0 commit comments