Thanks, but I need a little more help on this one.... So, when I click on the add resource button, I include the id of the supplier as an argument, and create the hidden field in the form, but the field is not getting populated!
My url is: http://localhost/dmsmca/resources/add/1 This is how I assign the variable in the controller: function add($area_id) And this is how it looks in my view: echo $form->input('area_id', array('type'=>'hidden')); However, if I look at the source, it's null: <input type="hidden" name="data[Resource][area_id]" value="" id="ResourceAreaId" /> What am I doing wrong? I'm really confused! Thanks, Mathieu On Mar 4, 9:21 pm, mscdex <[email protected]> wrote: > On Mar 4, 7:25 pm, Matt <[email protected]> wrote: > > > I would like the app to automatically know which supplier it is being > > related to. > > You can either: a) make the id of the supplier an argument to the > controller action (named or un-named) or b) insert a hidden field with > the value of the supplier's id on the form containing the contacts > multiple select list (or whatever form element you're using). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
