Good thing I spotted this thread eh?
OsisForms and HTML_QuickForms are slowly beginning to appeal to me...for the longest time I disliked the idea, because of the lack of *absolute* control using tables, but the more comfortable I become with CSS...the more I can see myself using something of that nature...
This is something I've been working on today actually. The render methods on any entity will accept a parameter telling it what parts you want to render. Every entity has a header, content and footer. So you can do something like this:
Code: Select all
$field = $factory->text('field', 'Foo:');
$anotherField = $factory->text('anotherField', 'Bar:');
?>
<table>
<tr>
<td>
<?php $field->render(OF::CONTENT); /* renders just the field itself */?>
</td>
</tr>
</table>
<?php
// OF::ALL == OF::HEADER | OF::CONTENT | OF::FOOTER
$anotherField->render(OF::ALL)
$field->render(OF::CONTENT) outputs
Code: Select all
<label for="field">Foo:</label><input type="text" id="field" name="field" value="" />
$anotherField->render(OF::ALL) outputs:
Code: Select all
<div class="field"><label for="anotherField">Bar:</label><input type="text" id="anotherField" name="anotherField" value="" /></div>
By default entities in containers output on top of one another but you will be able to use a tabular container (row method from the factory) to make entities appear side by side. So you'll mostly never need to do that stuff ^^ with HTML.
I've been reluctant to release this but go on seeing as the release date for OsisForms is officially 7th of December...
here's the early documentation for my library. (Only available when I have my server on).
As for XForms, it is entirely dependent on the uptake of browsers...so everything is on hold really. You can get an extension for FireFox for it but, of course, until IE implements it nobody is really going to be able to use it. Of course with OsisForms brand spanking new OO design you can now write separate renderers (output) and retrievers (input) for it so some time in the future you'll be able to migrate your old HTML forms to XForms by changing a single line -- at least that's the idea.