There’s more...

The AbstractField class comes with a couple of interesting properties, one of which we just used. The field property contains roughly the output of the model’s fields_get function for the field the widget is displaying. Apart from the relation key that gives you the co-model for x2x fields or the domain, you can also use it to query the field’s string, size, or whatever other property you can set on the field during model definition.

Another helpful property is nodeOptions, which contains data passed via the options attribute in the form definition. This is already JSON parsed, so you can access it like any object.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.177.14