fuelphp/fieldset — pull request #24 by kenjis (2014-07-07 02:14:44+00:00)
Title: Add renderElement() and getElementLabel() in Form

In some cases, we want to customize each of Form HTML more freely.
v2 has Render classes, but still want to write Form HTML as much as possible in view files.

This PR makes it possible like below:

~~~php
$form = new Form;
$renderer = new BasicRender();
$form->setRenderer($renderer);

$form['name'] = new Input\Text('name');
$form['name']->setLabel('label');
~~~

And `$form->renderElement('name')` returns HTML of the Input\Text element.
`$form->getElementLabel('name')` returns the label text of it.

So if we pass the `$form` object to view, we can make a view like below:

~~~php

getElementLabel('name') ?>
renderElement('name') ?>

...
~~~

In fact we also need a method to get validation error message, but I don't know how to do it.

Any comments are welcome.