<?php 
$options = array();
foreach ($subjects as $subject) {
	$options[$subject->subject_ID] = $subject->subject_name;
}
 ?>
 <div id="ajax-form-container">
<?= form_open('exam_configuration/add_subject', array('class'=>'form ajax','data-replace'=>'#ajax-form-container')); ?>
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal">&times;</button>
	<h4 class="modal-title">Add Subject</h4>
</div>
<div class="modal-body">
 	<div class="row">
 		<div class="col-sm-6 col-sm-offset-3">
			<?= form_dropdown(array('name'=>'subject','label' => 'Subject :', 'options' => $options, 'placeholder'=>'Select a Subject.')); ?>
			<?= form_input(array('name'=>'nos_ques','label'=>'No. of Questions to include from this Subject per Exam :')); ?>
		</div>
 	</div>
 </div>
<div class="modal-footer">
	<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cancel</button>
	<button type="submit" class="btn btn-success btn-sm">Add</button>
</div>
<?= form_close(); ?>
</div>