Update models_fieldtypes.rst - Add example to display multiple fields (#551)

pull/451/merge
Monviech 4 weeks ago committed by GitHub
parent 040d2bdffe
commit 94ee5e68e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -391,6 +391,21 @@ Define relations to other nodes in the model, such as to point the attribute :co
</Model>
</pipe>
To display multiple fields, the :code:`display_format` is required.
.. code-block:: xml
<pipe type="ModelRelationField">
<Model>
<pipes>
<source>OPNsense.TrafficShaper.TrafficShaper</source>
<items>pipes.pipe</items>
<display>number,description</display>
<display_format>%s - %s</display_format>
</pipes>
</Model>
</pipe>
.. csv-table:: ModelRelationField
:header: "Parameter", "Options", "Purpose"
:widths: 30, 20, 40

Loading…
Cancel
Save