UPDATE-RATE

Die Test-Installation wird aktuell zwischen 8:00 und 18:00 Uhr stündlich zur vollen Stunde aktualisiert.

Alles neu macht der Mai

ILIAS 9 ist da! Alle Infos zu den Highlights der neuen Version gibt es hier!

Documentation

Kitchen Sink documentation of style: 'Delos' of skin: 'ILIAS'

Hidden

Description

Purpose
Hidden inputs are used for transmitting persistent data which the user should not manipulate.
Composition
Hidden inputs consist of a html-input type hidden.
Effect
A hidden input is rendered where developers can set any kind of value that should be transmitted.
Context
  1. The Hidden input is used in UI-forms.

Rules

Usage
  1. Use this input for persistent data which the user should not manipulate.

Example 1: Base

<?php
 
declare(strict_types=1);
 
namespace ILIAS\UI\examples\Input\Field\Hidden;
 
/**
 * Example show how to create and render a basic hidden input field and attach it to a
 * form. This example does not contain any data processing.
 */
function base()
{
    //Step 0: Declare dependencies
    global $DIC;
    $ui = $DIC->ui()->factory();
    $renderer = $DIC->ui()->renderer();
 
    //Step 1: Define the text input field
    $hidden = $ui->input()->field()->hidden()->withValue("csrf_token_or_some_other_persistent_data");
 
    //Step 2: Define the form and attach the section.
    $form = $ui->input()->container()->form()->standard("#", [$hidden]);
 
    //Step 4: Render the form with the text input field
    return $renderer->render($form);
}
 

Relations

Parents
  1. UIComponent
  2. Input
  3. Field