Skip to content
Snippets Groups Projects
Commit f96b0ee8 authored by Manon Bourgognon's avatar Manon Bourgognon
Browse files

attribute enum added

parent 4c82b5fe
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ solid-form-search
Allows you to filter the contents of a component that uses the ``filter-mixin`` such as ``solid-display`` or ``solid-map``.
This must have a ``filtered-by`` attribute set to the id of the current ``solid-form-search``.
.. code:: html
<solid-form-search
......@@ -47,6 +48,18 @@ Attributes
for the field ``xyz``. It’s particularly useful with a dropdown
field.
``enum-xyz``
~~~~~~~~~~~~~
List of values of your choice for the field ``xyz``.
They have to be filled manually and must be separated by commas.
It’s particularly useful with a dropdown or radio field.
Two formats are possible:
* ``enum-xyz="value1, value2, value3"`` : each value will be displayed
and loaded in value attribute
* ``enum-xyz="value1 = a, value2 = b, value3 = c"``: each value will be displayed
and "a", "b", "c" will be loaded in value attribute.
Widgets
-------
By default, the widget used is ``<solid-form-label-text>``. Cf the
......
......@@ -52,6 +52,18 @@ Attributes
for the field ``xyz``. It’s particularly useful with a dropdown
field.
``enum-xyz``
~~~~~~~~~~~~~
List of values of your choice for the field ``xyz``.
They have to be filled manually and must be separated by commas.
It’s particularly useful with a dropdown or radio field.
Two formats are possible:
* ``enum-xyz="value1, value2, value3"`` : each value will be displayed
and loaded in value attribute
* ``enum-xyz="value1 = a, value2 = b, value3 = c"``: each value will be displayed
and "a", "b", "c" will be loaded in value attribute.
``order-asc-xyz`` or ``order-desc-xyz``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Name of the field used to order the range list ``xyz``.
......
Widgets API Reference
==================
======================
Widgets are created at the moment you ask for it for the first time.
The name of the widget is analyzed to build a widget which uses the features and template you want.
......@@ -43,8 +43,8 @@ A widget is built like this.
- ``number``: set ``value`` in an ``<input>`` of type ``number``
- ``rangenumber``: set 2 values in 2 ``<input>`` of type ``number``. Used for filtering with min and max.
- ``hidden``: set ``value`` in an ``<input>`` of type ``hidden``
- ``dropdown``: set ``value`` in a ``<select>``. The list is provided via the ``range`` attribute, which expects a container’s URL.
- ``radio``: set ``value`` in a list of radio buttons. The list is provided via the ``range`` attribute, which expects a container’s URL.
- ``dropdown``: set ``value`` in a ``<select>``. The list is provided via the ``range`` attribute, which expects a container’s URL, or via the ``enum`` attribute, which takes a list of the values separated by commas.
- ``radio``: set ``value`` in a list of radio buttons. The list is provided via the ``range`` attribute, which expects a container’s URL, or via the ``enum`` attribute, which takes a list of the values separated by commas.
- ``multiple``: Accept a container URI as a ``value``, and inserts one widget per resource with a “remove” button for each widget, and an “add” button.
- ``multipleselect``: Accept a container URI as a ``value``, and inserts a dropdown widget with the ``multiple`` attribute.
- ``file``: Inserts an ``<input/>`` and an ``<input type="file"/>``.
......
......@@ -27,6 +27,7 @@ Welcome to Startinblox's documentation
import_documentation/Components/Solid-Display
import_documentation/Components/Solid-Form
import_documentation/Components/Solid-Form-Search
import_documentation/Components/Solid-Delete
import_documentation/Components/Solid-Calendar
import_documentation/Components/Solid-Map
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment