Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--Controllel-->
- $data = array(
- 'kamar' => $this->input->post('kamar',TRUE),
- 'isi_max' => $this->input->post('isi_max',TRUE),
- 'status' => $this->input->post('status',TRUE),
- 'kondisi' => implode(' ',$this->input->post('kondisi',TRUE)),
- 'perlengkapan' => $this->input->post('perlengkapan',TRUE)
- );
- $this->Kamar_ikhwan_model->insert($data);
- <!--view-->
- <select id="kondisi" name="kondisi" class="select2_multiple form-control" multiple="multiple" >
- <option value=''>--Pilih--</option>
- <option value='AC Bagus'>AC BAGUS</option>
- <option value='AC Rusak'>AC RUSAK</option>
- <option value='Atap Bagus'>ATAP BAGUS</option>
- <option value='Atap Bocor'>ATAP BOCOR</option>
- <option value='Kursi Bagus'>KURSI BAGUS</option>
- </select>
- <!-- Select2 -->
- <script>
- $(document).ready(function() {
- $(".select2_single").select2({
- placeholder: "Select a state",
- allowClear: true
- });
- $(".select2_group").select2({});
- $(".select2_multiple").select2({
- maximumSelectionLength: 10,
- placeholder: "Max. 10!",
- allowClear: true
- });
- });
- </script>
- <!-- /Select2 -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement