I realize I'm probably trying to build a form inside a form with the
create-button approach, which is no good... so I should build a custom
form...

I'd like to use my custom create for my OrderAssist as it is, so how
can I pull that off? I'm guessing something like what I have below?

<form with="&OrderAssist.create">
  <select-many:Toppings/>
  <submit label="add"/>
</form>

I've already tried using what code seems to work for the order assist
edit page on my show page to no avail. it looks like

<form with="&OrderAssist.create">
  <field-list fields="topping"/>
  <submit label="add"/>
</form>

but that doesn't work either... i've included the necessary accessible
=> true in the model relations section, but i can't access the
toppings from the OrderAssist.create form...

so now what?



On Jan 10, 4:19 pm, hobo_hippy <[email protected]> wrote:
> I've already got a working create button behaving exactly as I want it
> to (with a bunch of fancy controller update code working with it). Now
> i need a select-many instance in the same context as this create
> button. Here's the breakdown:
>
> 1) The create button has a custom create action that grabs all kinds
> of information in the context of the page which is saved to the
> database
>
> 2) I want to add a select-many to the context of the create button
> form allowing a user to select several instances of another model to
> be linked to the instance being created by the create button. I've
> already got the has-many to has-many relationship setup via a :through
> => relationship in the models.
>
> What would the code look like to sequence a select-many inside of a
> create button form? Can you even do that?
>
> My models have the following pertinent relationships
>
> order_assist has_many topping_assist, accessible => true
> order_assist has_many toppings through => topping_assist, accessible
> => true
>
> topping has_many topping_assist
> topping has_many order_assist
>
> topping_assist belongs_to topping
> topping_assist belongs_to order_assist
>
> I tried the following but nothing is showing up:
>
> <create-button:order_assist update="" message="" label="add">
>     <select-many:toppings update=""/>
> </create-button>
>
> After reviewing the edit page for order_assists, I found hobo
> autogenerated the style of selection i wanted from the select-many. I
> checked the auto/rapid/forms file and it looks pretty simple. it just
> calls field-list fields="..., toppings, ..." which got me thinking I
> should just add that field to the create button. So i tried
>
> <create-button:order_assist update="..." message="..." label="..."
> fields="toppings"/>
>
> but i get a "string not matched" error referring to the
> fields="toppings" param
>
> So should I be trying to pass fields to the create button? or passing
> a select-many inside the create button? Or something completely
> different?
>
> Code example would help too!

-- 
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.

Reply via email to