HTML5 required attribute for some input forms
This commit is contained in:
@@ -111,7 +111,7 @@ class QnanewanswerForm extends Form
|
||||
|
||||
$out->hidden('qna-question-id', $id, 'id');
|
||||
// TRANS: Field label.
|
||||
$out->textarea('qna-answer', _m('Enter your answer'), null, null, 'answer');
|
||||
$out->textarea('qna-answer', _m('Enter your answer'), null, null, 'answer', true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -111,7 +111,8 @@ class QnanewquestionForm extends Form
|
||||
$this->title,
|
||||
// TRANS: Field title for a new question.
|
||||
_m('The title of your question.'),
|
||||
'title'
|
||||
'title',
|
||||
true // HTML5 "required" attribute
|
||||
);
|
||||
$this->unli();
|
||||
$this->li();
|
||||
@@ -122,7 +123,8 @@ class QnanewquestionForm extends Form
|
||||
$this->description,
|
||||
// TRANS: Field title for question details.
|
||||
_m('Your question in detail.'),
|
||||
'description'
|
||||
'description',
|
||||
true // HTML5 "required" attribute
|
||||
);
|
||||
$this->unli();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user