-1

I am a beginner in Kohana PHP and need do a form with date field. The code is:

<?=form::open('controllerInscricao/index')?>

<div>Matricula: <?=form::input('ALUNO_MATRICULA' );?></div>

<div>Data: </div>

<?=form::submit('btn_submit', 'Salvar') ?>
<?=form::close()?> 

How make in the date field?

1 Answers1

0

Form doesn't natively support this and as your question is currently written, it is not clear, how exactly the field has to look like.

However, you can write this method yourself by extending the core class. Simply add the file application/classes/Form.php with code like

class Form extends Kohana_Form
{
    public static function date($name, $value = NULL, array $attributes = NULL) {
        // return your HTML
    }
}
kero
  • 10,647
  • 5
  • 41
  • 51