Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
update a select field with ajax
  • Hi all,
    At the moment I'm learning fuel.
    I'm testing and I need to do something similar:
    3 select fields,
    all loads the contents of a different database.
    eg
    Community, city, town.
    database community: id, name
    city ??database : id, name community_id
    town database : id, name city_id. And when you select an option selct field community.
    The city field need to load the contents of the selected community towns. etc ...
    and same with town select field. What is the way to do this with fuelphp?
    All content must be updated without reloading the page. (Using, AJAS or jquery etc ...) I'm learning various frameworks.
    This test will serve me to finally pick a single framework and work with it. I hope someone can help me.
    Thank you very much in advance
  • Create a REST controller (a controller extending Controller_Rest), call that though ajax and have it return json data to update your page.
  • can you give me some example?
    Thanks.
  • http://docs.fuelphp.com/general/controllers/rest.html. Use the standard jquery calls to perform the ajax request.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion