Multifield widgets are used to allow authors to enter a dynamic number of data points. By default, these data points are entered as simple textfield controls. How can that be changed to allow for other types of input?
Here is an example of a multifield whose inner widget’s xtype is pathfield:
Problem: To create a multifield, a new widget of xtype multifield me be created. But xtype is traditionally what defines the input type, so we can’t change that directly.
Solution: Create another widget inside the multifield called
fieldConfig
and use that to customize the widget.
The node images is the multifield xtype. It’s where the name, in this case
./images
, is specified. Within that widget node, create another widget node named fieldConfig
. Specify additional properties, like xtype: pathfield
within that node.
Extracting the properties: retrieving data stored in this field is done in the same manner as standard multifield components.
Resources:
No comments :
Post a Comment