Wau so ne kurze Antwort die mir soviel gebracht hat hatte ich nie, vor allem das var_dump($this) half mir auf die Sprünge. Besten Dank das hat mich ein Riesen Stück weiter gebracht und mir x Stunden erspart. Also falls du mal in Vietnam Da Nang bist hast du ein Woche Unterkunft zu gut.
Ich bevorzuge SVG's einzuschiessen (mit PNG Fallback) vor Iconfonts. So kann ich per CSS einzelne Teile eines Icon die Farbe ändern oder sogar animieren so bringt man sogar Uhren zum laufen.
Für Interresierte folgend meine Final Lösung so wie es hier steht setzt es das Framework Foundation http://foundation.zurb.com/docs und https://useiconic.com voraus.
Das form_row.html5 habe ich Schlussendlich gar nicht verändert.
form_textfield.html5 Template
HTML-Code:
<?php $this->extend('form_row'); ?>
<?php if ($this->name == 'email'): ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<div class="row collapse lo">
<div class="small-2 columns">
<span data-tooltip aria-haspopup="true" title="Ihre E-Mail-Adresse die sie bei Ihrer Anmeldung verwendeten." class="prefix"><img data-src="files/dist/iconic/svg/smart/envelope.svg" class="iconic iconic-sm" alt="mail"></span>
</div>
<div class="small-10 columns">
<input type="<?= $this->type ?>" placeholder="Ihre E-Mail-Adresse..." 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() ?>>
</div>
</div>
<?php if ($this->addSubmit): ?>
<input type="submit" id="ctrl_<?= $this->id ?>_submit" class="submit" value="<?= $this->slabel ?>">
<?php endif; ?>
<?php $this->endblock(); ?>
<?php else: ?>
<?php $this->block('label'); ?>
<?php if ($this->label): ?>
<label for="ctrl_<?= $this->id ?>"<?php if ($this->class): ?> class="<?= $this->class ?>"<?php endif; ?>>
<?php if ($this->mandatory): ?>
<span class="invisible"><?= $this->mandatoryField ?></span> <?= $this->label ?><span class="mandatory">*</span>
<?php else: ?>
<?= $this->label ?>
<?php endif; ?>
</label>
<?php endif; ?>
<?php $this->endblock(); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<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 if ($this->addSubmit): ?>
<input type="submit" id="ctrl_<?= $this->id ?>_submit" class="submit" value="<?= $this->slabel ?>">
<?php endif; ?>
<?php $this->endblock(); ?>
<?php endif; ?>
form_captcha.html5 Template
HTML-Code:
<?php $this->extend('form_row'); ?>
<?php $this->block('field'); ?>
<?php $calculate = $this->getQuestion() ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<div class="row collapse">
<div class="small-2 columns">
<span data-tooltip aria-haspopup="true" title="<?php echo $calculate; ?>" class="prefix"><img data-src="files/dist/iconic/svg/smart/calculator.svg" class="iconic iconic-sm" alt="envelope"></span>
</div>
<div class="small-10 columns">
<input type="text" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="captcha mandatory<?php if ($this->class) echo ' ' . $this->class; ?>" autocomplete="off" placeholder="<?php echo $calculate; ?>" value=""<?= $this->getAttributes() ?>>
</div>
</div>
<?php if ($this->addSubmit): ?>
<input type="submit" id="ctrl_<?= $this->id ?>_submit" class="submit" value="<?= $this->slabel ?>">
<?php endif; ?>
<?php $this->endblock(); ?>
Lesezeichen