tobz-nz/autoform-spark — Issue #2: Adding extra markup for every form field
Author: kuroi
Created: 2012-01-28 19:53:16+00:00
State: open

Liking the class greatly. Many thanks for it. But I have a question.

I'm wanting HTML markup that's slightly more sophisticated than simple label / input tags. I can use the before and after methods to iterate across the fields like this

...php
$fields = get_object_vars($this->autoform->fields);
foreach ($fields as $field => $attributes)
{
$this->autoform->before($field,'

');
$this->autoform->after($field,'

');
}
php...

but it feels as though there should be a way to set this as a default rather than needing to iterate over all the fields. Am I missing something?