update
parent
a15a3bc432
commit
31d3c2c5ac
|
@ -779,9 +779,10 @@ if (!function_exists('formKriteria')) {
|
||||||
$option = json_decode($data->option);
|
$option = json_decode($data->option);
|
||||||
$value = json_decode(@$penilaian->value);
|
$value = json_decode(@$penilaian->value);
|
||||||
$valueOld = json_decode(@$penilaianOld->value);
|
$valueOld = json_decode(@$penilaianOld->value);
|
||||||
|
dd(@$value);
|
||||||
|
|
||||||
foreach($option as $keyOption => $dataOption){
|
foreach($option as $keyOption => $dataOption){
|
||||||
|
|
||||||
if(@$value){
|
if(@$value){
|
||||||
if(in_array($dataOption, (is_array(@$value) ? @$value : array(@$value)))){
|
if(in_array($dataOption, (is_array(@$value) ? @$value : array(@$value)))){
|
||||||
$checked = 'checked';
|
$checked = 'checked';
|
||||||
|
@ -795,7 +796,7 @@ if (!function_exists('formKriteria')) {
|
||||||
$key = 'number_'.$keyKriteria.'_'.$keyOption;
|
$key = 'number_'.$keyKriteria.'_'.$keyOption;
|
||||||
|
|
||||||
$html .= '<div class="custom-control custom-checkbox m-2">';
|
$html .= '<div class="custom-control custom-checkbox m-2">';
|
||||||
$html .= '<input type="checkbox" '.(@$value == $dataOption ? 'checked' : (@$valueOld == $dataOption ? 'checked' : '') ).' class="custom-control-input is-required" id="'.$key.'" value="'.$dataOption.'" name="input_'.$data->key.'[]">';
|
$html .= '<input type="checkbox" '.@$checked.' class="custom-control-input is-required" id="'.$key.'" value="'.$dataOption.'" name="input_'.$data->key.'[]">';
|
||||||
$html .= '<label class="custom-control-label" for="'.$key.'">'.$dataOption.'</label>';
|
$html .= '<label class="custom-control-label" for="'.$key.'">'.$dataOption.'</label>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue