CodeIgniter Forums
Saving data from Modal forms to Calendar! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Saving data from Modal forms to Calendar! (/thread-53608.html)



Saving data from Modal forms to Calendar! - El Forum - 07-31-2012

[eluser]Unknown[/eluser]

Hi Guys! I'm a newbie in php and ci. I'm doing a project for a hotel reservation. I need help in saving the data from a modal form to a calendar library. I just created the modal forms. Im not sure what to put in the controller to save the data from the modal forms.

here is the code from the view

<div class="modal" id="popReservationInformationForm">
<div class="modal-header">
<button class="close" data-dismiss="modal">x</button>
<h3>&lt;?php echo $hotelName.' '.$this->lang->line('calendar_reservation'); ?&gt;</h3>
</div>

<div class="modal-body">

&lt;?php echo form_open('calendar/index', array('class' => 'form-horizontal')); ?&gt;

<div class="control-group">

&lt;?php echo form_label($this->lang->line('calendar_room_category'),'room types',array('class'=>'control-label')); ?&gt;

<div class="controls">

&lt;?php print form_dropdown('room_type_id', $room_categories, '', 'class="input-xlarge"')?&gt;

</div>
</div>

<div class="control-group">

&lt;?php print form_label($this->lang->line('calendar_checkin_date'),'check in',array('class'=>'control-label')); ?&gt;

<div class="controls">

&lt;?php print form_input('',set_value('', ''),'id="start_date" name="start_date" class="span2 datepicker"'); ?&gt;

</div>
</div>


<div class="control-group">

&lt;?php print form_label($this->lang->line('calendar_checkout_date'),'check out',array('class'=>'control-label')); ?&gt;

<div class="controls">

&lt;?php print form_input('',set_value('', ''),'id="end_date" name="end_date" class="span2 datepicker"'); ?&gt;

</div>
</div>
</div>

<div class="modal-footer">

<button class="btn" data-dismiss="modal">Close</button>

&lt;?php print form_button(array('name'=>'save', 'value'=>$this->lang->line('calendar_reserve'), 'type'=>'submit', 'class'=>'btn btn-primary', 'content' => $this->lang->line('calendar_reserve'))); ?&gt;

&lt;?php echo form_close(); ?&gt;

</div>
</div>