how to create a form without any model?


i want to create a form without any model like this:


<form action="index.php?r=controller/action" name="form" method="post" >



my question is: i dont know how to set url and how to get post value in controller?

pls help

Why do you want to create a form without a model?

Create a form with some model. This is the basic concept. There’s no single point in using Yii when you don’t want to use a model for your form.

my database is nosql (cassandra) and i try to create a form with a relational model and it not worked.

now my question is how to create a form when my database is nosql?????

i install cassandra truly and it worked but i dont know how to use cassandra with yii2 structure?

I see.

I have no experience with cassandra, so I can’t give you a good guidance. But …

  1. Yii2’s Active Record doesn’t support cassandra out of the box. Search some yii2 extension that supports cassandra.

  2. If you can’t find a good extension, then you have to write your own model that supports cassandra. You should extend yii\base\Model ( and implement some basic methods like save(), delete(), … etc. in order to use it like an ActiveRecord.

Anyway, I would like to hear from experts on this, too. :)


i found a way to fix that according to yii2 structure as you say.

i extend some class to fix that.