# Adding Custom Fields

{% hint style="info" %}
In older versions of Converia, custom fields are still referred to as EAV fields.
{% endhint %}

### General Information

Custom fields (formerly EAV fields) are additional fields that can query further information during participant registration, submission of contributions, and in personal data (C3).

Typically, each custom field requires **a data field** and **two associated form references**. In total, you need **three entries** for a functioning additional field: one form reference in the frontend to display a fillable form field, and one form reference in the backend to retrieve the information in the backend.

## Creating a Custom Field (EAV Field) <a href="#neues-zusatzfeld-eav-feld-erstellen" id="neues-zusatzfeld-eav-feld-erstellen"></a>

New *Custom Fields* can be created by adding an entry via *Add data field*.

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2FLTj1EonHhkNwKFVhr2G3%2F2024-11-12_15h05_02.png?alt=media&#x26;token=2e853c95-e764-4917-907a-2e66354e363d" alt="Creating a Custom Field"><figcaption><p>Fig. 1: Creating a Custom Field</p></figcaption></figure>

**Name**

The *Name* is used to uniquely identify and assign the Custom Field and the associated field references in the system.

**Reference**

The *Reference* depends on whether the Custom Field is intended for the registration or personal data (in this case: type = PERSON) or for the submission of contributions (in this case: type = PAPER).

**Data type**

Selecting the *Data type* determines what type of information is stored in the Custom Field.

{% hint style="warning" %}
It is important to select the correct *Data type*, otherwise the information in the additional field will not be saved correctly or at all.
{% endhint %}

<table><thead><tr><th width="207">Type: PERSON</th><th width="194">Type: PAPER</th><th width="174">Custom Fields</th><th></th></tr></thead><tbody><tr><td>Person - Numerical value (Integer)</td><td>Paper - Numerical value (Integer)</td><td>Select, checkbox, file (=Upload), Radio</td><td><ul><li>Numerical value/ Selection</li></ul></td></tr><tr><td>Person - Text single-line (Varchar)</td><td>Paper - Text single-line (Varchar)</td><td>TText (single line)</td><td><ul><li>Short text (max. 250 char.)</li></ul></td></tr><tr><td>Person - Text multi-line (Text)</td><td>Paper - Text multi-line (Text)</td><td>Text (multi line)</td><td><ul><li>Text</li></ul></td></tr></tbody></table>

{% hint style="danger" %}
A file upload in the frontend registration (step personal data) is currently not implemented or possible!
{% endhint %}

### Adding *Form references* <a href="#formularbezuge-hinzufugen" id="formularbezuge-hinzufugen"></a>

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2FZAaqzdJZEb9dn03pq2Wa%2F2024-11-12_15h09_36.png?alt=media&#x26;token=8a91398d-a987-42d2-b919-3638d4cfe1fe" alt="Adding Form references"><figcaption><p>Fig. 2: Adding <em>Form references</em></p></figcaption></figure>

Sobald das Feld angelegt wurde, fehlen noch die **Formularbezüge**. In der Regel ist immer ein Formularbezug im Backend (*BE Person* / *BE Paper*) nötig und ein Formularbezug im Frontend an der gewünschten Stelle. Für ein Zusatzfeld müssen also **zwei** identische Felder erstellt werde**n.**

As soon as the field has been created, the **Form references** are still missing. As a rule, a form reference is always required in the backend (BE Person / BE Paper) and a form reference in the frontend at the desired location. **Two** identical fields must therefore be created for an additional field.

### Configuring form references <a href="#formularbezuge-konfigurieren" id="formularbezuge-konfigurieren"></a>

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2FTcCUCRyHG74RsAxYC0jz%2F2024-11-12_15h12_08.png?alt=media&#x26;token=b5636963-fd9f-4510-96f5-099dc5d1614d" alt="Configuring form references"><figcaption><p>Fig. 3: Configuring form references</p></figcaption></figure>

**Name of the field**

For the sake of clarity, the field name should be the same as for the Custom field. In this case, it would be “Transport”.

#### Displayed nam&#x65;**/** Description

The *Displayed name* is always displayed above the additional field in the frontend, while the *Description* is displayed below. If the event is multilingual, the *Displayed name* and *Description* must be entered in all languages.

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2Fj1BvOuVf6pZuAup9uLC8%2F2024-11-12_15h18_24.png?alt=media&#x26;token=3d6c6041-c9ac-4860-9cde-21e787e9cf82" alt="The newly created custom field in the registration (frontend)"><figcaption><p>Fig. 4: The newly created custom field in the registration (frontend)</p></figcaption></figure>

**Form**

The **correct form** must be selected here.&#x20;

{% hint style="success" %}
It is always advisable to start with the front-end form. The settings and view can then be conveniently checked there. If everything is as expected, the entries for the backend can be duplicated.
{% endhint %}

**Element type**

When choosing the *element type*, consider the specific needs of your form and ensure it aligns with the intended functionality. Select the appropriate checkboxes to determine whether the field should be mandatory for the user and if it should be visible in the form.

**Note:** The types "Headline" and "Paragraph" do not require a link in the backend form as they provide structure rather than data input. These only need a field in the frontend form to describe and divide other fields.

After selecting the *element type*, ensure it is compatible with the chosen [**data type**](https://manual.converia.de/administration/zusatzfelder-anlegen#speicheradapter) or adjust it accordingly.

**Element types: Exception for Headline and Paragraph**

The field types *Headline* and *Paragraph* are not input fields but serve to describe and divide additional fields.

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2FrrDTvKb8m6nnwcX3BOcw%2F2024-11-12_15h20_01.png?alt=media&#x26;token=dd4e1f90-91c3-4565-a435-7e80e40e550d" alt="Selecting the correct data field"><figcaption><p>Fig. 5: Selecting the correct data field</p></figcaption></figure>

*Headline* and *Paragraph* should only be a single entry on a form and should not have a field reference or data field assignment, as this may cause errors when saving.

## Linking to the Frontend

Once the EAV field has been created with the field reference to the BE field, the link to the frontend must be established.

To do this, go back to the EAV homepage by selecting *Back to list*. The previously created form can be accessed via the ⚙ (e.g., *BE Person*).

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2FAQ6GDPmVMLFD0QNLSRfR%2F2024-11-12_15h21_33.png?alt=media&#x26;token=5b8f6846-7b68-4718-a00f-c24c6b2fc831" alt="Select form"><figcaption><p>Fig. 6: <em>Select form</em></p></figcaption></figure>

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2F4xEt0cpTDC1WMQDDOHXk%2F2024-11-12_15h23_36.png?alt=media&#x26;token=f61ae0f1-2e86-489f-9e5b-1a6f78569748" alt="Duplicate entry"><figcaption><p>Fig. 7: <em>Duplicate entry</em></p></figcaption></figure>

In this form, the field just created can be found. This entry can be duplicated. The duplicate (identified by the suffix *\_copy*) can be further edited.

It is important that **the original field and the duplicate have the same content** to avoid distortions and misrepresentations in the system.

The only part that is changed in the duplicate is the **form**. Here, the desired location in the frontend is selected, in this example *FE Registration step 3 participant details*.

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2FtWdRlDX3CIcg80I4fqCA%2F2024-11-12_15h28_34.png?alt=media&#x26;token=7bfe1b00-20ca-48db-85ac-ef85aa7e7a36" alt=""><figcaption><p>Abb. 8: Auswahl des Formulars</p></figcaption></figure>

**Possible locations for an additional field in the frontend are:**

| Type: PERSON                      | Type: PAPER                  |
| --------------------------------- | ---------------------------- |
| Registration - Step personal data | Submission - step 1 general  |
| Submission - step 3 author data   | Submission - step 2 abstract |
| C3 - personal data                | Session submission - step 1  |

#### The completed Custom Field <a href="#the-completed-additional-field" id="the-completed-additional-field"></a>

Once everything is correctly configured, the completed additional field appears in both the frontend and backend.

In step 3 of the registration, it looks as follows:

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2Fj1BvOuVf6pZuAup9uLC8%2F2024-11-12_15h18_24.png?alt=media&#x26;token=3d6c6041-c9ac-4860-9cde-21e787e9cf82" alt="The completed Custom Field (registration)"><figcaption><p>Fig. 9: The completed Custom Field (registration)</p></figcaption></figure>

In the backend, all custom fields of type PERSON can be found in the personal data under the tab ***Additional Fields***.

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2FtDqJGNKXUku501SZYJM3%2F2024-11-12_15h30_41.png?alt=media&#x26;token=ff35edb3-1976-44a3-bd9a-8b84bab291a4" alt="Backend-Type PERSON"><figcaption><p>Fig. 10: Backend-Type PERSON</p></figcaption></figure>

For the type PAPER, the additional fields can be found in the contribution details under the tab ***Configurable Fields***.

<figure><img src="https://3664324957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFHhRMg6uphOg3wLL7zym%2Fuploads%2FEBzh52wS7oCNVdbXyAUV%2F2024-11-12_15h34_57.png?alt=media&#x26;token=31676a5a-f3e3-4913-a519-81a7ff83c268" alt="Backend-Type PAPER"><figcaption><p>Fig. 11: Backend-Type PAPER</p></figcaption></figure>

### Validators for Additional Fields <a href="#validators-for-additional-fields" id="validators-for-additional-fields"></a>

So far, there are four validators for additional fields:

1. **File size** for file upload
2. **File type** for file upload
3. Number of **characters** for text fields
4. Number of **words** for text fields

{% hint style="info" %}
Validators can be created by our developers on request.
{% endhint %}
