I am a beginner in Kohana PHP and need do a form with date field. The code is:
我是Kohana PHP的初学者,需要做一个带日期字段的表单。代码是:
<?=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 个解决方案
#1
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
但是,您可以通过扩展核心类来自己编写此方法。只需添加文件application / classes / Form.php,代码如下
class Form extends Kohana_Form
{
public static function date($name, $value = NULL, array $attributes = NULL) {
// return your HTML
}
}
#1
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
但是,您可以通过扩展核心类来自己编写此方法。只需添加文件application / classes / Form.php,代码如下
class Form extends Kohana_Form
{
public static function date($name, $value = NULL, array $attributes = NULL) {
// return your HTML
}
}