Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Feldtyp »input«

Der Feldtyp input nimmt einzeilige Zeichenketten, wie z.B. Namen und Telefonnummern auf. Die Konfiguration für ein Namensfeld (siehe Abbildung 6.1) sieht etwa wie folgt aus:

'name' => array(
     'label'   => 'Name der Organisation',
     'config'  => array(
          'type' => 'input',
          'size' => 20,
          'eval' => 'trim,required',
          'max'  => 256
     )
),

Die eingegebene Zeichenkette wird auf 256 Zeichen begrenzt ('max'=> 256), überstehende Leerzeichen werden entfernt (trim), und das Speichern eines leeren Felds wird verhindert (required).

Beispiel für den Feldtyp »input« als Namensfeld

Abbildung 6.1 Beispiel für den Feldtyp »input« als Namensfeld

Der Typ input kann auch zur Eingabe von Datums- und Zeitangaben verwendet werden:

'minimum_value' => array(
    'label'   => 'gültig vom',
    'config'  => array(
         'type'    => 'input',
         'size' => 8,
         'checkbox' => '',
         'eval' => 'date'
    )
),

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial