This is a good example we should have in the doc...: -) On Jun 12, 4:51 pm, storitel <[email protected]> wrote: > So I finally got around to solving this - as Kevin suggested... > > in application.dryml... > > <def tag="input-many" for="Offer"> > <input-many> > <name-one:engineer/> > </input-many> > </def> > > Thanks again Kevin > > On 1 June, 18:39, kevinpfromnm <[email protected]> wrote: > > > > > It doesn't use the form for the sub-form, just another field list by > > default. Check theinput-manydocs as that's what it uses by default. > > > On May 27, 9:07 pm, storitel <[email protected]> wrote: > > > > i think that's the right direction, but i've not got it working so > > > far... > > > > because i've got a has_many through => relationship, i think i need to > > > do the extend for Assignment, not Project. But then for some reason > > > *nothing* i do makes any change to the Assignment form. the original > > > form shows up even if i do > > > > <extend tag="form" for="Assignment"> > > > <old-form replace> > > > <h1> hello? </h1> > > > <old-form/> > > > </extend> > > > > i assume there's something about ajax sub-forms i'm not getting... > > > > On 27 May, 21:16, kevinpfromnm <[email protected]> wrote: > > > > > yeah, you need to drill down to the appropriate field and change the > > > > input to a name-one, but since it's a has many association, it's a bit > > > > more complex. name-one really is meant for a belongs_to > > > > relationship. I think you could do it with a hybrid ofinput-manybut > > > > not sure if you'll need any other code on the backend to handle it or > > > > if I'm sending you in completely the wrong direction :D > > > > > with forms, you extend in application.dryml > > > > > <extend tag="form" for="Project"> > > > > <old-form merge> > > > > <field-list:> > > > > <engineers-view:> > > > > <input-many> > > > > <name-one /> > > > > </input-many> > > > > ... > > > > > good luck and let me know if that works out. > > > > > On May 27, 1:31 pm, storitel <[email protected]> wrote: > > > > > > hi chaps, > > > > > this is probably just my lack of wetware cpu but I'm not understanding > > > > > how to use autocomplete, or even whether it should be the solution for > > > > > my situation. What I'm dealing with is... > > > > > > a Project has_many :engineers, :through => :assignments > > > > > > So by default I end up with an edit form for project with an ajax sub- > > > > > form to add assignments - the subform has a dropdown list of > > > > > engineers.So far so good - but with lots of engineers I'd prefer the > > > > > user to type part of the engineer's name and select from a subset. > > > > > > So first of all, I think this is a case for autocomplete - is that > > > > > correct? > > > > > > Then if so I think I add autocomplete to AssignmentsController ... > > > > > > autocomplete :engineer > > > > > > But then what? So far the dropdown is still a dropdown. Do I need to > > > > > work with the view somehow? The only documentation seems to be as > > > > > follows > > > > > - Hobo at Work dCH5 oesn't say what to do to the view > > > > > - Rapid Rails With Hobo doesn't mention autocomplete > > > > > -The Agility section on this seems to be doing something too complex > > > > > for my tiny brain > > > > > > any help gratefully received > > > > > Paul
-- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
