Ich brauche aktuell im Registrierungs-Formular den Placeholder nur für das Feld Geburtstag (DD.MM.YYYY).
Eigentlich wollte ich in meinem Modul die Logik der Generierung des Geb.-Feldes updatesicher beeinflussen, ich habe aber leider keine Lösung gefunden. Daher habe ich das jetzt so gelöst:
Template form_textfield
PHP-Code:
<input type="<?= $this->type ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text<?php if ($this->hideInput) echo ' password'; ?><?php if ($this->class) echo ' ' . $this->class; ?>" value="<?=
ersetzen mit:
PHP-Code:
<?php if ($this->name == 'dateOfBirth'): ?>
<input type="<?= $this->type ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text<?php if ($this->hideInput) echo ' password'; ?><?php if ($this->class) echo ' ' . $this->class; ?>" value="<?= specialchars($this->value) ?>"<?= $this->getAttributes() ?> placeholder="DD.MM.YYYY">
<?php else: ?>
<input type="<?= $this->type ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text<?php if ($this->hideInput) echo ' password'; ?><?php if ($this->class) echo ' ' . $this->class; ?>" value="<?= specialchars($this->value) ?>"<?= $this->getAttributes() ?>>
<?php endif; ?>
Lesezeichen