Hi, im trying to add new required form field for guest checkout. But the field still can be blank without value. how can i appear error message like email field?
here is my code
if (isset($_post['nric'])){
$nric = $_post['nric'];
} elseif (isset($_session['guest']['nric'])){
$nric = $_session['guest']['nric'];
} else{
$nric = '';
}
$this->data['form']['fields']['general']['nric'] = $form->getFieldHtml(
array (
'type' => 'input',
'name' => 'nric',
'value' => $nric,
'required' => true,
));