Hi,
the action “main/sets” render’s a view with an CActiveForm inside:
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'search-sets-form',
'enableAjaxValidation'=>true,
));?>
The form-data should be send to a specific controller/action called "ajax/postings". For this, a ajaxSubmitButton is part of the CActiveForm:
<?php echo CHtml::ajaxSubmitButton('Submit', $this->createUrl('ajax/postings'),
array('success'=>'function(data){ $("#searchSetDialog").dialog("close");
return false;}')
);?>
If the user submit the data without any changes (simple press the submit button) everything work fine.
If the user do any changes at the form and submits the form, 2 POST request are created:
1st POST to the contoler/action defined at the ajaxSubmitButton ("ajax/postings") and
2nd request to the controller/action where the form comes from ("main/sets").
Is there any way to avoid the form sending POST data to "main/sets"??
Thank you, rall0r
Byt the way: Ajax-Validation works fine. Validation Requests where send to the AjaxSubmitButton-Url: action "ajax/postings". ?:-/