Welcome Guest, Not a member yet? Register   Sign In
RE-populating Dynamic Drop-downs
#4

[eluser]Jay Turley[/eluser]
As this is a "theoretical" problem, my theoretical answer is that you should submit your form using ajax. That way you don't disturb the values of the select boxes by reloading that portion of the DOM.

Of course, if you do this, you can't use CI's validation system because it wants to reload the entire form. So you would need to have your own custom validation.

I would probably approach it this way - use jQuery to hijack the form submission, submit the data to a controller which returns a json object letting you know what the errors are, and then showing them using ajax as well.

Essentially you will be building your own custom RIA validation system Sad

You could also store the values in the session and then write a custom javascript to repopulate the chained selects, but this seems more complicated.

Best of luck!


Messages In This Thread
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 12:37 AM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 01:09 AM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 01:24 AM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 01:40 AM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 02:37 AM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 05:36 AM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 07:36 AM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 07:43 AM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 08:31 AM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 09:33 PM
RE-populating Dynamic Drop-downs - by El Forum - 09-17-2008, 10:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB