V3.0.3 - Module: Forge Form_Dropdown error messages don't work
|
fredhowe
Joined: 2012-05-28
Posts: 12 |
Posted: Tue, 2012-07-03 09:22
|
|
how do i put a error message to the dropdown menu, to force a selection if nothing is selected. like on \modules\gallery\helpers\album.php $group->dropdown("albums_title") thanks in advance |
|
| Login or register to post comments |

Posts: 25940
->rules('required')should do the trick
http://docs.kohanaphp.com/addons/forge
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
Thanks Dave for the quick info.
looks quite simple
and it works.
Fred
Posts: 12
One more question.
\modules\gallery\helpers\album.php
function get_add_form(
how do i take off all rules from a input,
if i will take care of the value and validation.
i want to change input to hidden.
like:
$group->hidden("name")->value("");
$group->hidden("slug")->value("");
but this make problems.
behind there is still a validation?
thanks in advance
Fred
Posts: 25940
Make it hidden but give the value a value that can validate.
More validation is done for the slug for example in gallery/modules/gallery/models/item.php
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team