Yii submit Ajax Form

Here is small example tutorial how to submit your forms via Ajax. It can also be applied to forms without models you just have to get the info from your post array.

Step 1 – Requirements

  • 2 views index.php and ajax_page.php
  • 1 controller
  • 2 actions and 1 model

Step 2 – Controller

Step 3 – Views


  • Ajith

    great tutorial.

  • CRajesh

    what about third view…and is it possible to submit form with ajaxsubmitbutton without reloading webpage .in yii framework 1.

    • metin

      I don’t know what you mean about third view. This is yii framework 1 I haven’t touched yii2 yet

Recent Posts

Recent Comments

Categories