Redirect After Create Record

Hi,

i have 4 tables and i want the to create a steps form to insert in these tables

for example

tables (a1,a2,a3,a4)

the first form should insert the data in a1 and send the inserted id to the next form wish will insert the data in a2

i’m new in the yii so i need some help with this

thanks.

Generate your crud for the 4 tables using gii or Giix*

Then localize the code that redirect upon saving in the create method of your first model’s controller, and change it in order to redirect to the create method of the second model’s controller, ans so on.

  • there are other generators, notably directed towards Twitter Boostrap webapps

thanks

but what you mean by

"* there are other generators, notably directed towards Twitter Boostrap webapps "

It was a footnote to the "*" in the first line of post (ie apart from gii and Giix, there are other CRUD generators, especially useful if you plan on a bootsrapped webapp)

Hi again thanks for the answer

can you provide me an example about this CRUD

[color="#008000"]NOTE: moved to proper section (General Discussions for Yii 1.1.x instead of Instalation & Setup)[/color]

One of the most recent ones: Awecrud: http://www.yiiframework.com/extension/awecrud/

One of the most popular ones (Bootstrap boilerplate + code generation): http://www.yiiframework.com/extension/bootstrap

Or you can search Yii extensions: http://www.yiiframework.com/search/?q=crud&type=extension (sorts by relevance, you can also sort by date)

thanks for the response