Hi I have the following dropdown lists
<td colspan=4>
<table id="mytable">
<tbody>
<tr>
<td><?php echo $form->labelEx($meta,'ScriptArgumentClass_id'); ?>
<?php
$criteria = new CDbCriteria;
$criteria->order = 'ScriptArgumentClassType'; //or whatever field
echo CHtml::activeDropDownList($meta,'[]ScriptArgumentClass_id',CHtml::listData(AutoScriptArgumentClass::model()->findAll($criteria),'id','ScriptArgumentClassType'), array('prompt'=>'Please select Argument class type'));
?>
</td>
<td><?php echo $form->labelEx($model,'AutoTnType_id'); ?>
<?php
$criteria = new CDbCriteria;
$criteria->order = 'TnType'; //or whatever field
echo CHtml::activeDropDownList($meta,'[]Type_id',CHtml::listData(AutoTnType::model()->findAll($criteria),'id','TnType'), array('prompt'=>'Please select TN type'));
?>
</td>
Using Jquery I am able to add one more row below every time I click on AddNew link
<?php Yii::app()->clientScript->registerCoreScript(‘jquery’); ?>
<script type="text/javascript">
$(document).ready(function() {
$("#add").click(function() {
$('#mytable tr:last').clone(true).insertAfter('#mytable tr:last');
return false;
});
});
</script>
<a href="#" id="add">Add New</a>
but I am unable to get all the row values in the controller???
Any help is appreciated.