Welcome Guest, Not a member yet? Register   Sign In
Linked Forms
#1

[eluser]Ashes-to-Ashes[/eluser]
I am trying to create a form that when it is in valid it reloads (easy)
If it is valid and post variable to go to next form is set, it loads next form (same url)
If it is valid and post variable final save is set it saves to database and shows final data (not a form)

The problem is any page that is the result of a successfully posted form will evaluate $this->form_validation->run() as TRUE

I have tried:
unset($this->form_validation);
That did not work.

Any ideas?
#2

[eluser]jprateragg[/eluser]
Save the previous form fields into a session or a cookie. Then on your final stage, you can just pull the data from the session/cookie and insert into the database.
#3

[eluser]Ashes-to-Ashes[/eluser]
I will try that if I can't get this new method I am working on to fly.

The new only slightly different method:

Add call back for hidden field 'save_flag' which only returns true if save flag is set.
It looks like it might work, except I am having an issue with my field not getting sent to the call back function so it is checking nothing.

#4

[eluser]Ashes-to-Ashes[/eluser]
This method with the save flag works. The form keeps reloading on submit until save_flag == 't'
This allows me to go straight to the next form without using any redirects. The idea with the session is a good idea however, and for other work flows may be the better choice




Theme © iAndrew 2016 - Forum software by © MyBB