Skip to content

Commit 3e98ca7

Browse files
committed
feat(form,question): mandatory check in browser
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 03a2693 commit 3e98ca7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

inc/form.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public function showForm($ID, $options = []) {
380380

381381
echo '<tr class="tab_bg_1">';
382382
echo '<td width="20%"><strong>' . __('Name') . ' <span class="red">*</span></strong></td>';
383-
echo '<td width="30%"><input type="text" name="name" value="' . $this->fields["name"] . '" size="35"/></td>';
383+
echo '<td width="30%"><input type="text" name="name" required="required" value="' . $this->fields["name"] . '" size="35"/></td>';
384384
echo '<td width="20%"><strong>' . __('Active') . ' <span class="red">*</span></strong></td>';
385385
echo '<td width="30%">';
386386
Dropdown::showYesNo("is_active", $this->fields["is_active"]);

inc/question.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ public function showForm($ID, $options = []) {
736736
'autofocus' => '',
737737
'value' => $this->fields['name'],
738738
'class' => 'required',
739+
'required' => 'required',
739740
]);
740741
echo '</td>';
741742

0 commit comments

Comments
 (0)