News
1.1.8.4 released
Minor issues updated.
1.8.1.3 tagged
Minor changes.
Typo fixed in orm plugin, post_filters now actually do post_filters instead of pre_filters
Formo dev blog: bmidget.tumblr.com
Formo dev, Ben Midget, is finally running a blog about Formo development and all things Kohana.
1.1.8 released (r133) - enum, post_filters, more
- orm plugin automatically creates dropdown for enum fields
- Added support for post_filters
- Post_filters and pre_filters now work when defined in model
- $form->save() now works appropriately even when values are changed after validation
- there should be very little reason to use ->get_model() now
Version 1.5, KO3 Compliance, Better ORM integration, More
Formo version 1.5 is in the works and will offer the following changes:
- Built for KO3 (1.2.x will be 2.4 compatible)
- Extendable drivers
- Consistency with Kohana validation
- Reworked, easy to use but more powerful ORM/HABTM plugins
- As always, just as simple to spread into true MVC system or MC or even just C. * With this in mine, editing any html directly in the Controller is different and very simple (think html objects)
- A couple ideas I'm working with right now and am not sure will make the cut
Kohana's version 3 has some exciting new features, and Formo users will be able to feel at home again when working with KO3.
Note that supporting Kohana 2.4 will continue for awhile as most of us are still working in 2.3 and ultimately 2.4.
1.1.7 Released (r120)
- error() method for groups works properly
- call_user_func uses the array(object, method) syntax for broader compatibility
- return string when rendering allows changing in pre_render hook
- added official fieldset plugin
And one major change:
$form->get(TRUE) has been officially deprecated.¶
To further clarify, ->get() is still there, but the bool flag is now gone for reasons that can be read about here.
Instead of the old method, simply pass the form object to your view:
$form->content->bind('form', $form);
Open and close your form with $form->open(), $form->close()
Then, add $form-> to any elements you defined in your views with the previous method.
<div>
$form->open()
<p><?=$form->email?></p>
<p><?=$form->username?></p>
<p><?=$form->submit?></p
$form->close()
</div>
...
Finall, variables that look like $element_error are now simply $form->element->error
Hopefully this deprecation will not infuriate anyone. It should be an extremely easy fix wherever everyone used the older method, and it was just a pointless feature to have anyway.
1.1.6.2 Released (r115)
More select driver bug fixes:
Select keys/values are not swapped upon submitting.
1.1.6.1 Released
Small update with only one change:
Select lists generated from the ORM plugin function properly.
1.1.6 Available
Minor update 1.1.6 is available in the files.
Changes:- 0 values are allowed and do not throw required errors any more
- Many Formo_Element functions now return the object so you can set appropriate things in the view
- Other minor fixes
Example of setting options in the view:
<?=$form->username->add_class('input')?>
As always, feedback is welcome.
1.1.5 Available (3 comments)
- fixed repeating label bug in add_group
- added fourth parameter for set() when dealing with groups
- groups return proper values with get_values()
- ajaxval plugin adds input error class for consistency
- password can keep value with $keep
- table plugin updated to work with Fromo 1.x...
A couple things worth noting¶
To set an individual element in the group, use the new fourth parameter in set():
->set('groupname', 'elementname', 'value', 20)
There is a new variable in the password driver called keep. It tells whether to keep the password's value upon submitting or not. By default it's set to FALSE.
The best way to make this TRUE by default is by defining it in the config file:
$config['defaults']['password'] => array('keep' => TRUE);
Also available in: Atom