How to check if the previous line is exit_statuscompleted, and, depending on this, whether it will be completed or expected to display the update update button or hide it in CodeIgniter. I can't think of logic to implement this, and here is my view code:
<?php } else if($USER->permissions[0] == 'all' && $row['responsibility'] == $USER->email && $row['completion_status'] == 'Pending'&& $row['sequence']-1 == 'completed') { ?>
<td style="width:10%">
<input type="hidden" name="grievance_id" value="<?=$row['id']?>">
<input type="hidden" name="action" value="update">
<input type="submit" <?=($row[ 'checklist_id']=="Denied" ||$row[ 'checklist_id']=="Approved" )? "disabled='true'": "";?>name="sumit_button" value="Update" class="btn" style="float:left;background:#d8d8d8;color:#000;box-shadow:0px 0px 1x rgba(0,0,0,0.2)!important;">
</td>
<?php }
Run codeHide resultAnd if the previous line exit_status is completed, then the update button will open, otherwise hide it. something like .. if ($ row ['sequence'] - 1) == 'completed' {show the else hide button}. Attached Image Image
enter image description here
source
share