Welcome Guest, Not a member yet? Register   Sign In
Populating Conditional Lists In Edit View
#1

I have a simple CRUD app. Add and Delete work fine. Having a small problem with the edit view.

The view has several drop down lists where a selection in one changes the contents in a 2nd via an Ajax call which queries a database.

eg  select a country, and a second drop down will get populated with states.

The 2nd drop down is populated via AJAX


When I populate the edit view populating the primary drop down works, and setting the correct selection is fine. However, the Ajax call does not get made, as I assume the change event does not get issued when CI creates the view.

What is the best way to populate the secondary drop down, and restore the value in it from the Model data.
Reply
#2

Maybe this will help.

codeigniter how to populate second dropdown list based on the first one using codeigniter:
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB