Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Is anyone using jquery mobile w/ fuel?
  • I'm trying to write a controller thats going to handle mobile interface but I think theres some conflicts with the jquery mobile application flow and fuel. For example links within the controller work fine but once I try to introduce form data everything goes to hell. I think because jquery mobile is attempting to use ajax calls or something, so i wanted to see if anyone else has tried implementing jquery mobile successfully.
  • I'm using jQuery mobile with FuelPHP and I had the same problems with posting forms. The solution is to turn off ajax and handle the form "the old way".
  • Haven't gotten round to working with jQuery mobile yet but this doesn't sound like a problem with Fuel. It sounds like you're not sure what is happening. If jQuery-mobile sends it in whatever way it should be available, but you have to fetch it from the right place. If jQuery is using the GET method for example you have to use Input::get()/Input::param() and not Input::post() for example.
  • Yeah I sorta figured it out. I thought I may need to extend the controller using rest but I don't. Even though jquery mobile is sending ajax requests you can pick them up as normal get/post vars in a normal controller. I was getting confused because normally when I'm debugging stuff I'd just put something like print_r($_POST) in the controller to see what input its getting but nothing would show up this way. However if I set that into the $data[] variable I do pick up the data, like
    $data['post_stuff'] = $_POST;
    

    and print it out in the view there is data.

Howdy, Stranger!

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

In this Discussion