alexa-tracking
Selamat Guest, Agan dapat mencoba tampilan baru KASKUS Masih Kangen Tampilan Sebelumnya
Kategori
Kategori
Home / FORUM / All / Tech / ... / Programmer Forum /
CHECKBOX CODEIGINITER
1024
1024
KASKUS
51
244
https://www.kaskus.co.id/thread/5be2c09c620881ea778b4573/checkbox-codeiginiter

CHECKBOX CODEIGINITER

halo gan help me for this . 

saya ingin menampilkan data yang akan di edit untuk(namun datanya lebih dari 1) 
View 
<div class="form-group">
        <label>Team</label><br>
                <input type="checkbox" name="team[]" value="Agent Email Non Transaksi" <?=(in_array("Agent Email Non Transaksi",$macros) ? 'checked=""' : '')?>> Agent Email Non Transaksi<br>
                <input type="checkbox" name="team[]" value="Agent Email RDM" <?=(in_array("Agent Email RDM",$macros) ? 'checked=""' : '')?>> Agent Email RDM<br>
                <input type="checkbox" name="team[]" value="Agent Email Payment" <?=(in_array("Agent Email Payment",$macros) ? 'checked=""' : '')?>> Agent Email Payment<br>
                <input type="checkbox" name="team[]" value="Agent 2nd Email" <?=(in_array("Agent 2nd Email",$macros) ? 'checked=""' : '')?>> Agent 2nd Email<br>
                <input type="checkbox" name="team[]" value="CS- Anti Fraud" <?=(in_array("CS- Anti Fraud",$macros) ? 'checked=""' : '')?>> CS- Anti Fraud<br>
                <input type="checkbox" name="team[]" value="Customer Satisfaction" <?=(in_array("Customer Satisfaction",$macros) ? 'checked=""' : '')?>> Customer Satisfaction<br>
                <input type="checkbox" name="team[]" value="Net Promotor Score" <?=(in_array("Net Promotor Score",$macros) ? 'checked=""' : '')?>> Net Promotor Score<br>
                <input type="checkbox" name="team[]" value="Live Chat" <?=(in_array("Live Chat",$macros) ? 'checked=""' : '')?>> Live Chat<br>
                <input type="checkbox" name="team[]" value="O2O" <?=(in_array("O2O",$macros) ? 'checked=""' : '')?>> O2O<br>
                <input type="checkbox" name="team[]" value="Quality Assurance" <?=(in_array("Quality Assurance",$macros) ? 'checked=""' : '')?>> Quality Assurance<br>
                <input type="checkbox" name="team[]" value="Quality Control" <?=(in_array("Quality Control",$macros) ? 'checked=""' : '')?>> Quality Control<br>
                <input type="checkbox" name="team[]" value="Call Center" <?=(in_array("Call Center",$macros) ? 'checked=""' : '')?>> Call Center<br>
                <input type="checkbox" name="team[]" value="Operation Delivery Monitoring" <?=(in_array("Operation Delivery Monitoring",$macros) ? 'checked=""' : '')?>> Operation Delivery Monitoring<br>
                <input type="checkbox" name="team[]" value="Operation Item Replacement" <?=(in_array("Operation Item Replacement",$macros) ? 'checked=""' : '')?>> Operation Item Replacement<br>
                <input type="checkbox" name="team[]" value="Operation KYC" <?=(in_array("Operation KYC",$macros) ? 'checked=""' : '')?>> Operation KYC<br>
                <input type="checkbox" name="team[]" value="Operation Payment" <?=(in_array("Operation Payment",$macros) ? 'checked=""' : '')?>> Operation Payment<br>
                <input type="checkbox" name="team[]" value="Operation Retur" <?=(in_array("Operation Retur",$macros) ? 'checked=""' : '')?>> Operation Retur<br>
                <input type="checkbox" name="team[]" value="Operation Telereminder" <?=(in_array("Operation Telereminder",$macros) ? 'checked=""' : '')?>> Operation Telereminder<br>
                <input type="checkbox" name="team[]" value="Social Media" <?=(in_array("Social Media",$macros) ? 'checked=""' : '')?>>Social Media <br>
                <input type="checkbox" name="team[]" value="VVIP Crisis Center" <?=(in_array("VVIP Crisis Center",$macros) ? 'checked=""' : '')?>>VVIP Crisis Center <br>
                <input type="checkbox" name="team[]" value="VVIP User Priority" <?=(in_array("VVIP User Priority",$macros) ? 'checked=""' : '')?>>VVIP User Priority <br>
              </div>

Model : 
public function update_account_backlog($post,$id_requester) {
$macros = array(
// 'type' => $post['type'], 
'team' => explode(",", ['team']),
'requester' => $post['requester'],
'email_requester' => $post['email_requester'],
'fullname' => $post['fullname'],
'emailagent' => $post['emailagent'],
'startdatetowork' => $post['startdatetowork'],
'state' => $post['state']

);

$this->db->where('id_requester',$id_requester);
if ($this->db->update('tblrequesteraccount', $macros)) {
return true;
} else {
return false;
}
}


Controller : 
public function proses_edit_backlogmacros($id_requester){
$this->DashboardZendesk_model->update_macros_backlog($post,$id_requester);

redirect(base_url()."index.php/backlog_form_editmacros/index/".$id_requester);
}


×
GDP Network
Copyright © 2018, Kaskus Networks, PT Darta Media Indonesia.
Ikuti KASKUS di