====== Extended attributes - managing EAVs and forms ======
===== Attributes forms =====
The form management can be found in **Settings -> Form definitions**, where forms can be managed. There can be more forms for one entity, and thus the attributes can be logically divided according to them.
{{ :devel:adm:forms_list.png?600 | forms list}}
The form is identified by its **name**, which must be unique to each entity.
Currently, CzechIdM automatically creates default forms named “default” for all entities.
At this moment, these forms are the only ones which are available from the CzechIdM graphical interface when editing entity (e.g. Role). The forms marked as “default” carry EAV attributes, which can be provisioned into the administered system.
The editing of the form is done by clicking on the detail of the given form – magnifying glass symbol next to the type. Or add a new form using the green button **Add**. EAV can have the following options:
* **Name** - Shown in the GUI
* **Code** - unique identifier
* **Main definition** - Every entity can have up to one main/default form. The main form is usually created during application first start and is visible in entity details.
* **System definition** - some CzechIdM entities like System and Virtual systems use EAVs as well. Those forms cannot be deleted or changed.
{{ :devel:adm:form_detail.png?600 | Form detail}}
===== Creating a new EAV for a form =====
Extended attributes can be found in **Settings -> Form definitions -> Form detail -> Form attributes**. A new attribute can be defined by clicking on **Add** button.
{{ :devel:adm:form_attributes_list.png?600 | Attributes list}}
An attribute has the following options:
* **Code** – Attribute name, must be unique within the whole IdM
* **Name** – the item name displayed in the GUI. Must be unique in the form.
* **Attribute type** – denotes the type of data saved in the attribute value. The most commonly used is “Text”.
* **Placeholder** – the filled-in text will be displayed in the entity attribute value until the editor enters a new value, i.e. it is a clue for what to fill in the item. For example, for the entity attribute “Personal number” a suitable Placeholder would be “Employee’s personal number, do not fill for external workers”.
* **Order** – defines the order of attributes in the form. It influences the displaying of the attribute list in the entity detail. Using this option, the attributes can be conveniently clustered within the form, for example.
* **Default value** – When created, the entity acquires an extended attribute with this value. If the value of the attribute is changed in the future, the default value will be replaced.
* **Description** – an option item description
* **Required** – the attribute must be filled in by every entity using the form.
* **Hidden** – the attribute is kept in an encrypted storage and the attribute value is not displayed in the GUI. The value is replaced by substitute characters.
* **Multi-valued** – the attribute can have more values at the same time. For example, „mobile = 723723723, 723777777“
* **System attribute** – a ReadOnly box. It marks attributes which are filled in by the system or copied from another agenda. These are, for example, attributes of the connected system, which are set in the system's agenda or returned by the system connector.
A system attribute cannot be deleted. Some of its items cannot be edited, either.
===== Filling EAV value =====
When a form and its attributes are defined, they are available in the detail of the entity in the tab “More information”.
{{ :devel:adm:user_eav.png?600 | User extended attributes}}
Currently only main/default forms are available in entities detail
===== Video Guide =====
[[https://www.youtube.com/watch?v=1EZ33BHcIY4&index=15&list=PLBeAQt3pe3EcdVE8QpCDEJcDsi_jtNQUb|How to add EAV]] - czech language