Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php echo CHtml::link("add new item", "#", array('id'=>'add-new-item')); ?>
<?php echo CHtml::link("remove item", "#", array('id'=>'remove-item')); ?>
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
<script type="text/javascript">
var str='';
str += '<div><?php echo CHtml::textField("FieldName"); ?></div>';
$('#form > div').last().remove();
<form id="form">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment