I am trying to setup a form with buttons only. The form should only submit via POST. While trying out some of the sweet CHtml options for this purpose I noticed some strange behaviours.
It would be great if anyone helps me answer the above two questions.
I have another question related to ajax submit and it is when I declare:
CHtml::ajaxSubmitButton() and according to the documentation I can include a 4th parameter array $htmlOptions=array ( ). In the html options I can declare ‘params’ but those parameters will be passed only when there is also ‘submit’=>‘url’ declared. If there is however a submit declared than the ajax is broken and Yii performs a regular POST submit. Is this the expected behavior as it does not make much sense to work that way. I would like to perform ajax request and still be able to pass params.
I am experiencing some other issues with ajax submit process. I am trying to develop a feedback form as a separate widget. I have a radiobutton list with ajax[yes, no]. So if the person clicks on yes ajax loads thank you for your feedback. If the person clicks on No ajax loads a text area and ajaxSubmitButton to submit the text area. The problem here is that clicking on the ajaxsubmitbutton submits the form as a regular post submission and never submits it via ajax. Why do you think is that.