[Extension] Xupload

ok the problem that I see is that you are using the XUploadAction, this action doesn’t actually do anything with the file. its just moves it to a folder. also the XUploadForm its just an example model, you should be using your Assessment model instead. and create your own action that will save to the database.

Take a look a this workflow that explains in more detail

Thanks Asgaroth! I will look into that Wiki.

Regards,

Amar.

Hi, Asgaroth! Thank you for your extension and I really need help with it. (Sorry for my English)

I’ve created a new page for test your extension and everything was ok. I’ve created controller like in your wiki example (http://www.yiiframework.com/wiki/348/xupload-workflow/). On this test page everything is ok. Next part was to add this functional to page with CActiveForm. On this page i’m using the same controller, but nothing happens at all, even thumbs of image before upload aren’t shown (DOM-element with it haven’t approached, it’s not CSS mistake). So I have returned to an example form and controller, that was without my changes, still nothing

I’ll post my code here.

view




<?php  $form=$this->beginWidget('CActiveForm', array(

		'id'=>'add-board-form',

                'enableAjaxValidation'=>true,

		'clientOptions'=>array(

			'validateOnSubmit'=>true,

			),

)); ?>

//

//there are few textFields, checkBoxes and dropDownLists

//i don't think that they are important in this example

//but i have Jui Slider, i've tried to comment it.

//I thought there might be a problem with the re-wiring jQuery,

//but jQuery was linked just a single time


		<?php

		$this->widget('zii.widgets.jui.CJuiSliderInput', array(

		    'model'=>$model,

		    'attribute'=>'totalSpots',

			'options'=>array(

			'min'=>6,

			'max'=>9,

			),

		));?>


  <?php echo CHtml::submitButton('Save Board'); ?>

//here is my XUpload widget

<?php

            $this->widget( 'xupload.XUpload', array(

                'url' => Yii::app( )->createUrl( "/board/upload"),

                //our XUploadForm

                'model' => $photo,

                //We set this for the widget to be able to target our own form

                'htmlOptions' => array('id'=>'somemodel-form'),

                'attribute' => 'file',

                'multiple' => true,

                //Note that we are using a custom view for our widget

                //Thats becase the default widget includes the 'form' 

                //which we don't want here

                'formView' => 'application.views.site._testform',

                )    

            );

            ?>

<?php $this->endWidget(); ?>



controller




    public function actionAddBoard()

    {

        $model = new BoardModel;

        $this->layout = '/layouts/leftMenu/BoardOwner/BoardOwner';




	   Yii::import("xupload.models.XUploadForm");

	   $photo = new XUploadForm;




        if(isset($_POST['ajax']) && $_POST['ajax']==='add-board-form')

        {

            echo CActiveForm::validate($model);

            Yii::app()->end();

        }


        if(isset($_POST['BoardModel']))

        {

            $model->attributes=$_POST['BoardModel'];

            if($model->validate())

            {

                $model->saveBoard();

                $this->redirect($this->createUrl("board/manageBoard"));

            }

        }

        $this->render('addBoard', array('model' => $model,'photo'=>$photo));

    }



how does you application.views.site._testform view looks like? the problems looks like it could be nested forms.

Thank you for reply!

I’m using template from example and it’s used in my test page (where everything is ok).


<!-- The file upload form used as target for the file upload widget -->

<?php echo CHtml::beginForm($this -> url, 'post', $this -> htmlOptions);?>

<div class="row fileupload-buttonbar">

	<div class="span7">

		<!-- The fileinput-button span is used to style the file input field as button -->

		<span class="btn btn-success fileinput-button"> <i class="icon-plus icon-white"></i> <span>Add files...</span>

			<?php

            if ($this -> hasModel()) :

                echo CHtml::activeFileField($this -> model, $this -> attribute, $htmlOptions) . "\n";

            else :

                echo CHtml::fileField($name, $this -> value, $htmlOptions) . "\n";

            endif;

            ?>

		</span>

		<button type="submit" class="btn btn-primary start">

			<i class="icon-upload icon-white"></i>

			<span>Start upload</span>

		</button>

		<button type="reset" class="btn btn-warning cancel">

			<i class="icon-ban-circle icon-white"></i>

			<span>Cancel upload</span>

		</button>

		<button type="button" class="btn btn-danger delete">

			<i class="icon-trash icon-white"></i>

			<span>Delete</span>

		</button>

		<input type="checkbox" class="toggle">

	</div>

	<div class="span5">

		<!-- The global progress bar -->

		<div class="progress progress-success progress-striped active fade">

			<div class="bar" style="width:0%;"></div>

		</div>

	</div>

</div>

<!-- The loading indicator is shown during image processing -->

<div class="fileupload-loading"></div>

<br>

<!-- The table listing the files available for upload/download -->

<table class="table table-striped">

	<tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody>

</table>

<?php echo CHtml::endForm();?>



Remove the form tags, because they cause you to have nested forms, and thats why the widget doesn’t work.




<?php echo CHtml::beginForm($this -> url, 'post', $this -> htmlOptions);?>

<?php echo CHtml::endForm();?>

I did it, but there is no changes, DOM-element with thumbs, filename and etc. still not appeared in table below.

Are there any errors in the javascript console?

No, it’s clear and other scripts working correctly on this page (i’ve tried to comment those scripts and figured that there still no changes).

I think oin the widget you should change your form id from




'htmlOptions' => array('id'=>'somemodel-form'),



to


'htmlOptions' => array('id'=>'add-board-form'),

Done, but still no changes. I have no idea where this problem coming from.

please show the generated html, and the generated javascript.

Here is all generated code by extension (except registered scripts)

Thank you for helping.


<!-- The template to display files available for upload -->

<script id="template-upload" type="text/x-tmpl">

{% for (var i=0, file; file=o.files[i]; i++) { %}

    <tr class="template-upload fade">

        <td class="preview"><span class="fade"></span></td>

        <td class="name"><span>{%=file.name%}</span></td>

        <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>

        {% if (file.error) { %}

            <td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>

        {% } else if (o.files.valid && !i) { %}

            <td>

                <div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>

            </td>

            <td class="start">{% if (!o.options.autoUpload) { %}

                <button class="btn btn-primary">

                    <i class="icon-upload icon-white"></i>

                    <span>{%=locale.fileupload.start%}</span>

                </button>

            {% } %}</td>

        {% } else { %}

            <td colspan="2"></td>

        {% } %}

        <td class="cancel">{% if (!i) { %}

            <button class="btn btn-warning">

                <i class="icon-ban-circle icon-white"></i>

                <span>{%=locale.fileupload.cancel%}</span>

            </button>

        {% } %}</td>

    </tr>

{% } %}

</script>

<!-- The template to display files available for download -->

<script id="template-download" type="text/x-tmpl">

{% for (var i=0, file; file=o.files[i]; i++) { %}

    <tr class="template-download fade">

        {% if (file.error) { %}

            <td></td>

            <td class="name"><span>{%=file.name%}</span></td>

            <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>

            <td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>

        {% } else { %}

            <td class="preview">{% if (file.thumbnail_url) { %}

                <a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a>

            {% } %}</td>

            <td class="name">

                <a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a>

            </td>

            <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>

            <td colspan="2"></td>

        {% } %}

        <td class="delete">

            <button class="btn btn-danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">

                <i class="icon-trash icon-white"></i>

                <span>{%=locale.fileupload.destroy%}</span>

            </button>

            <input type="checkbox" name="delete" value="1">

        </td>

    </tr>

{% } %}

</script>

<!-- The file upload form used as target for the file upload widget -->

<div class="row fileupload-buttonbar">

	<div class="span7">

		<!-- The fileinput-button span is used to style the file input field as button -->

		<span class="btn btn-success fileinput-button"> <i class="icon-plus icon-white"></i> <span>Add files...</span>

			<input id="ytXUploadForm_file" type="hidden" value="" name="XUploadForm[file]" /><input multiple="multiple" name="XUploadForm[file]" id="XUploadForm_file" type="file" />

		</span>

		<button type="submit" class="btn btn-primary start">

			<i class="icon-upload icon-white"></i>

			<span>Start upload</span>

		</button>

		<button type="reset" class="btn btn-warning cancel">

			<i class="icon-ban-circle icon-white"></i>

			<span>Cancel upload</span>

		</button>

		<button type="button" class="btn btn-danger delete">

			<i class="icon-trash icon-white"></i>

			<span>Delete</span>

		</button>

		<input type="checkbox" class="toggle">

	</div>

	<div class="span5">

		<!-- The global progress bar -->

		<div class="progress progress-success progress-striped active fade">

			<div class="bar" style="width:0%;"></div>

		</div>

	</div>

</div>

<!-- The loading indicator is shown during image processing -->

<div class="fileupload-loading"></div>

<br>

<!-- The table listing the files available for upload/download -->

<table class="table table-striped">

	<tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody>

</table>



I meant the generated html (the relevant), not parts of it, I need to see if nested forms are beign generated, and whats the form id the javascript is targeting.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 

<head>

    <link rel="stylesheet" type="text/css" href="/assets/19382857/jui/css/base/jquery-ui.css" />

<link rel="stylesheet" type="text/css" href="/assets/8f9afbee/css/jquery.fileupload-ui.css" />

<script type="text/javascript" src="/assets/19382857/jquery.js"></script>

<script type="text/javascript" src="/assets/19382857/jquery.yiiactiveform.js"></script>

<title>Billboard Jupiter - AddBoard Board</title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <meta name="keywords" content="Jupiter Home" /> 

    <meta name="description" content="Jupiter Home" /> 

    <link rel="stylesheet" type="text/css" href="/css/style.css" />

         <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

         <!--<script type="text/javascript" src="/js/slideCheck.js"></script>-->

         <script type="text/javascript" src="/js/checkStyle.js"></script>

</head>


<body>

	<div class="page">

            

		<div class="topBlackBar">

		<div class="topBlackBarMenuHolder">

	

		<ul id="yw1">

<li><a href="/index.php?r=profile/info">Profile</a></li>

<li><a href="/index.php?r=site/logout">Logout</a></li>

</ul>	</div>

    </div>

            <!-- mainmenu -->


		<div class="pageSiteHead">

			<div class="pageHeadContainer">

				<div class="pageHeadLogo"><a href="/index.php?r=site/index"><img src="images/logoJupiter.png" alt="Board Jupiter"/></a></div>

				<div class="pageHeadContent">

					<div class="pageHeadNameAndPhone">

						<div class="pageSiteHeadName"><b>Digital Advertising</b> Management</div>

						<div class="pageHeadPhone"></div>

					</div>

					<div class="pageSiteHeadMenu">

				<ul id="yw2">

<li><a href="/index.php?r=orders/activeOrders">Orders</a></li>

<li class="active"><a href="/index.php?r=board/addBoard">Boards</a></li>

<li><a href="/index.php?r=boardAdvertisers/manageAdvertisers">Advertisers</a></li>

<li><a href="/index.php?r=approves/pending">Ad Approvals</a></li>

<li><a href="/index.php?r=reprotingBoard/newOrder">Reporting</a></li>

<li><a href="/index.php?r=orders/newOrder">Administration</a></li>

</ul>				</div>

            </div>

		</div>

	</div>

	<div class="siteContentFormRow">

<div class="siteRowHolder">

<div class="leftCol">

<ul id="yw0">

<li class="active"><a href="/index.php?r=board/addBoard">Add New Board</a></li>

<li><a href="/index.php?r=board/manageBoard">Manage Boards</a></li>

<li><a href="/index.php?r=site/index">Billboards at Auction</a></li>

<li><a href="/index.php?r=board/test">Test Page</a></li>

</ul> 

</div>

<script type="text/javascript" src="/js/slideCheck.js"></script>

<div class="rightCol">

<div class="boardOwnerTopImg"></div>

<div class="addBoardForm">

<h1> New Board</h1>

<div class="addBoardFormLeft">

<h2>Enter Board details below:</h2>

<form id="add-board-form" action="/index.php?r=board/addBoard" method="post">	<div class="addBoardRow">

        <div class="fieldName">Board Name</div>

        <input name="BoardModel[boardName]" id="BoardModel_boardName" type="text" /><br/>

        <div class="errorMessage" id="BoardModel_boardName_em_" style="display:none"></div><br/>

     </div>  

	<div class="addBoardRow autoFill">

        <input id="ytBoardModel_isExcessInventory" type="hidden" value="0" name="BoardModel[isExcessInventory]" /><input checked="checked" name="BoardModel[isExcessInventory]" id="BoardModel_isExcessInventory" value="1" type="checkbox" />        Allow Board Jupiter to fill excess inventory?

        <div class="errorMessage" id="BoardModel_isExcessInventory_em_" style="display:none"></div>    </div>

	<div class="addBoardRow">

        Minimum CPM required for excess inventory ($)

        <input name="BoardModel[minimumCPM]" id="BoardModel_minimumCPM" type="text" /><br/>

        <div class="errorMessage" id="BoardModel_minimumCPM_em_" style="display:none"></div><br/>

      </div>

	<div class="addBoardRow">

        <div class="fieldName">Latitude</div> <div class="fieldName longtitude">Longitude</div>

		<input name="BoardModel[latitude]" id="BoardModel_latitude" type="text" />		<div class="errorMessage" id="BoardModel_latitude_em_" style="display:none"></div>        

        <input name="BoardModel[longitude]" id="BoardModel_longitude" type="text" /><br/>

        <div class="errorMessage" id="BoardModel_longitude_em_" style="display:none"></div><br/>

    </div>

	<div class="addBoardRow">

       <div class="fieldName">City</div><br/>

        <input name="BoardModel[city]" id="BoardModel_city" type="text" /><br/>

        <div class="errorMessage" id="BoardModel_city_em_" style="display:none"></div><br/>

    </div>

	<div class="addBoardRow">

       <div class="fieldName">State</div>  <div class="fieldName zip">Zip</div>

        <select name="BoardModel[state]" id="BoardModel_state">

<option value="NY">NY</option>

<option value="CA">CA</option>

</select>        <div class="errorMessage" id="BoardModel_state_em_" style="display:none"></div>        

        <input name="BoardModel[zip]" id="BoardModel_zip" type="text" />        <div class="errorMessage" id="BoardModel_zip_em_" style="display:none"></div>    </div>

	

	<div class="addBoardRow">

        <div class="fieldName location_description">Location Description</div>

        <textarea name="BoardModel[locationDescription]" id="BoardModel_locationDescription"></textarea><br/>

        <div class="errorMessage" id="BoardModel_locationDescription_em_" style="display:none"></div><br/>

    </div>

     <div class="addBoardRow">

	 <div class="sliderBackground">

		</div>

		<input id="BoardModel_totalSpots" name="BoardModel[totalSpots]" type="hidden" /><div id="BoardModel_totalSpots_slider"></div>	</div>

	   <div class="addBoardRow inputTotheLeft">

	<input type="submit" name="yt0" value="Save Board" />	</div>

   </div>

   <div class="addBoardFormRight">

   <h2> Set Board status:</h2>

   <div class="addBoardRow">

	   

	   <input id="ytBoardModel_status" type="hidden" value="0" name="BoardModel[status]" /><input rel="myCheck" checked="checked" name="BoardModel[status]" id="BoardModel_status" value="1" type="checkbox" />   </div>

   <h2 class="photoUpload">Photo Upload:</h2>

   <div class="addBoardRow">

		<div class="fieldName optionalPhotos">Optional Board Photos</div>

		<!--<img src="../images/photoLoader.jpg"/>-->

	<!-- The template to display files available for upload -->

<script id="template-upload" type="text/x-tmpl">

{% for (var i=0, file; file=o.files[i]; i++) { %}

    <tr class="template-upload fade">

        <td class="preview"><span class="fade"></span></td>

        <td class="name"><span>{%=file.name%}</span></td>

        <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>

        {% if (file.error) { %}

            <td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>

        {% } else if (o.files.valid && !i) { %}

            <td>

                <div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>

            </td>

            <td class="start">{% if (!o.options.autoUpload) { %}

                <button class="btn btn-primary">

                    <i class="icon-upload icon-white"></i>

                    <span>{%=locale.fileupload.start%}</span>

                </button>

            {% } %}</td>

        {% } else { %}

            <td colspan="2"></td>

        {% } %}

        <td class="cancel">{% if (!i) { %}

            <button class="btn btn-warning">

                <i class="icon-ban-circle icon-white"></i>

                <span>{%=locale.fileupload.cancel%}</span>

            </button>

        {% } %}</td>

    </tr>

{% } %}

</script>

<!-- The template to display files available for download -->

<script id="template-download" type="text/x-tmpl">

{% for (var i=0, file; file=o.files[i]; i++) { %}

    <tr class="template-download fade">

        {% if (file.error) { %}

            <td></td>

            <td class="name"><span>{%=file.name%}</span></td>

            <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>

            <td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>

        {% } else { %}

            <td class="preview">{% if (file.thumbnail_url) { %}

                <a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a>

            {% } %}</td>

            <td class="name">

                <a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a>

            </td>

            <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>

            <td colspan="2"></td>

        {% } %}

        <td class="delete">

            <button class="btn btn-danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">

                <i class="icon-trash icon-white"></i>

                <span>{%=locale.fileupload.destroy%}</span>

            </button>

            <input type="checkbox" name="delete" value="1">

        </td>

    </tr>

{% } %}

</script>

<!-- The file upload form used as target for the file upload widget -->

<div class="row fileupload-buttonbar">

	<div class="span7">

		<!-- The fileinput-button span is used to style the file input field as button -->

		<span class="btn btn-success fileinput-button"> <i class="icon-plus icon-white"></i> <span>Add files...</span>

			<input id="ytXUploadForm_file" type="hidden" value="" name="XUploadForm[file]" /><input multiple="multiple" name="XUploadForm[file]" id="XUploadForm_file" type="file" />

		</span>

		<button type="submit" class="btn btn-primary start">

			<i class="icon-upload icon-white"></i>

			<span>Start upload</span>

		</button>

		<button type="reset" class="btn btn-warning cancel">

			<i class="icon-ban-circle icon-white"></i>

			<span>Cancel upload</span>

		</button>

		<button type="button" class="btn btn-danger delete">

			<i class="icon-trash icon-white"></i>

			<span>Delete</span>

		</button>

		<input type="checkbox" class="toggle">

	</div>

	<div class="span5">

		<!-- The global progress bar -->

		<div class="progress progress-success progress-striped active fade">

			<div class="bar" style="width:0%;"></div>

		</div>

	</div>

</div>

<!-- The loading indicator is shown during image processing -->

<div class="fileupload-loading"></div>

<br>

<!-- The table listing the files available for upload/download -->

<table class="table table-striped">

	<tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody>

</table>

   </div>

   </div>


</div>

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

</div>

<div class="pageBottom">

		<div class="pageBottomArea">

			<div class="pageBottomColumn1">

			<h3>Quicklinks</h3>

			<ul>

				<li><a href="#">Home</a></li>

				<li><a href="#">About</a></li>

				<li><a href="#">FAQ's</a></li>

				<li><a href="#">Advertiseers</a></li>

				<li><a href="#">BoardOwners</a></li>

				<li><a href="#">Contact</a></li>

			</ul>

			</div>

			<div class="pageBottomColumn2">

				<h3>Latest Buzz</h3>

				<div class="latestBuzz">

					<div class="latestBuzzBulletin">

						<div class="bulletinMessage">Cu mei option officiis, <a href="#">ea assum</a> nusquam ius. Senserit persecuti ei mel.</div>

						<div class="bulletinTime">2 hours ago</div>

						<div class="bulletinAuthor">from CertumSoft</div>

					</div>

					<div class="latestBuzzBulletin">

						<div class="bulletinMessage">Cu mei option officiis, <a href="#">ea assum</a> nusquam ius. Senserit persecuti ei mel.</div>

						<div class="bulletinTime">2 hours ago</div>

						<div class="bulletinAuthor">from CertumSoft</div>

					</div>

				</div>

				

			</div>

			<div class="pageBottomColumn3">

			<h3>Contact us</h3>

			<div class="contactInfoArea">

				<p>Board Jupiter, adress line1<br />

				Adress line 2</p>

			</div>

			<div class="socialIconsArea">

				<img src="images/twIco.png" />

				<img src="images/fbIco.png" />

				<img src="images/linkedIco.png" />

			</div>

			

			

			

			<div class="bottomPhoneArea"></div>

			</div>

		</div>

	</div>

	<div class="bottomCopyrightBar">

	

		<div class="copyrightHolder">Copyright &copy 2012 Board Jupiter All Right Reserved</div>

	</div>

		

</div>

<script type="text/javascript" src="/assets/19382857/jui/js/jquery-ui.min.js"></script>

<script type="text/javascript" src="http://blueimp.github.com/JavaScript-Templates/tmpl.min.js"></script>

<script type="text/javascript" src="/assets/8f9afbee/js/jquery.fileupload.js"></script>

<script type="text/javascript" src="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script>

<script type="text/javascript" src="http://blueimp.github.com/JavaScript-Canvas-to-Blob/canvas-to-blob.min.js"></script>

<script type="text/javascript" src="/assets/8f9afbee/js/jquery.iframe-transport.js"></script>

<script type="text/javascript" src="/assets/8f9afbee/js/jquery.fileupload-ip.js"></script>

<script type="text/javascript" src="/assets/8f9afbee/js/jquery.fileupload-ui.js"></script>

<script type="text/javascript" src="/assets/8f9afbee/js/locale.js"></script>

<script type="text/javascript">

/*<![CDATA[*/

jQuery(function($) {

jQuery('#BoardModel_totalSpots_slider').slider({'min':6,'max':9,'value':null,'slide':function(event, ui) { jQuery('#BoardModel_totalSpots').val(ui.value); }});


jQuery('#add-board-form').fileupload({'url':'/index.php?r=board/upload'});

$('#add-board-form').yiiactiveform({'validateOnSubmit':true,'attributes':[{'id':'BoardModel_boardName','inputID':'BoardModel_boardName','errorID':'BoardModel_boardName_em_','model':'BoardModel','name':'boardName','enableAjaxValidation':true},{'id':'BoardModel_isExcessInventory','inputID':'BoardModel_isExcessInventory','errorID':'BoardModel_isExcessInventory_em_','model':'BoardModel','name':'isExcessInventory','enableAjaxValidation':true},{'id':'BoardModel_minimumCPM','inputID':'BoardModel_minimumCPM','errorID':'BoardModel_minimumCPM_em_','model':'BoardModel','name':'minimumCPM','enableAjaxValidation':true},{'id':'BoardModel_latitude','inputID':'BoardModel_latitude','errorID':'BoardModel_latitude_em_','model':'BoardModel','name':'latitude','enableAjaxValidation':true},{'id':'BoardModel_longitude','inputID':'BoardModel_longitude','errorID':'BoardModel_longitude_em_','model':'BoardModel','name':'longitude','enableAjaxValidation':true},{'id':'BoardModel_city','inputID':'BoardModel_city','errorID':'BoardModel_city_em_','model':'BoardModel','name':'city','enableAjaxValidation':true},{'id':'BoardModel_state','inputID':'BoardModel_state','errorID':'BoardModel_state_em_','model':'BoardModel','name':'state','enableAjaxValidation':true},{'id':'BoardModel_zip','inputID':'BoardModel_zip','errorID':'BoardModel_zip_em_','model':'BoardModel','name':'zip','enableAjaxValidation':true},{'id':'BoardModel_locationDescription','inputID':'BoardModel_locationDescription','errorID':'BoardModel_locationDescription_em_','model':'BoardModel','name':'locationDescription','enableAjaxValidation':true}]});

});

/*]]>*/

</script>

</body>

</html>

mmm, I don’t know, it looks fine to me. im sorry i can’t be more helpfull

Maybe you can send me working example with CActiveForm and your extension? I’ll try to find solution to this problem and I’ll let you know if i find something.

thanks for this great extension!

Well, i solved this problem, but i really not sure how i did it, i just used in another controller the same form and everything works fine, i’ve tried to add the same form line by line, and figured out that there some problem in html. I’m not sure the problem is the id or some other attribute, but with the same html extension didn’t work.

Thank you again for extension.

Im glad you got it working, sorry i couldn’t be more helpfull