Domanda

I am trying to build a multistep form with CodeIgniter,but I cant figure it out how it should be.My thoughts are to create for each step different contoller functions and views. Is my thought right or is there any better way to implement it? Do you recommend to create the fomrs using AJAX?

Thank you in advance.

È stato utile?

Soluzione

For youe problem i can suggest two solutions. It is up to you either you use ajax or form post.

Method 1

1.One first setp save the data to table 2.In the second and all other steps update the table. If you are going to give back functionality you will have to work carefully and make sure your form code has primary key when at least step one has passed through.

Method 2 In this method do not save in the table just through each form post to session and when the final step is passed through you can save the data to table from session once and for all

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top