Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthormsalhab
     

    hello friends

    I want to add a car for a specified owner.such that Owner has_many Cars and each Car belongs_to owner related by owner_id attribute.

    I want to use _form.tpl of the Car to input my car, but how to get the owner?

    My page look like this:

    Mr. Someone

    List of cars: car1 car2 .. .

    Create new Car /* this is a hyperlink to car/add so when click on this link I will add a car for Mr. Someone.

    I have tried to make hidden input in that view,but from where can i get the owner ID for Mr. Someone thanx

    •  
      CommentAuthorriffed
     

    If you set up your tables and associations, then owner_id is available in your cars table, so something like $cars->get('owner_id')