1

I want to generate a) When writing b) I believe That Is possible with form helpers / templates .

a)

<div class="SomeClass">
    <span>
        <i class="some OtherClass "></i>
    </span>
    <input type="text" ... >
</div>
<h4 class="error">Validation Message Goes Here</h4>

b )

<?= $this->form->field('name',array('label'=>false, 'placeholder'=>'someHolder')); ? >
floriank
  • 25,546
  • 9
  • 42
  • 66
obinoob
  • 677
  • 4
  • 13
  • 34

1 Answers1

1

Lithium form class have amazing comments.

You should try something like this:

<?php
echo $this->form->create(null);
echo $this->form->field(
    'name',
    [
        'template' => '<div{:wrap}><span><i class="some OtherClass"></i></span>{:input}</div>',
        'wrap' => ['class' => 'SomeClass'],
    ]
);
echo $this->form->error('name', null, ['template' => '<h4 class="error">{:content}</h4>']);
echo $this->form->end();
?>
fedeisas
  • 1,991
  • 2
  • 22
  • 34