It sounds like you want a combination of name-one and select-many. The first question is: have you tried select-many? It's not what you asked for, but it may just be "good enough".

If you do end up writing a "name-many" tag, this would be a welcome addition to Rapid, and we'd more than happy to assist you in such a task.

name-one is one of the only tags that requires controller support and is not self-contained in DRYML/Javascript/CSS. If you used scriptaculous' Autocomplete.Local instead of the standard Autocomplete, you might be able to avoid the controller support. Of course, that only works if the number of potential recipients is small enough.

You shouldn't need a session variable: take a look at the source code to select-many to see now it builds a Hobo compatible array in Javascript.

Bryan


atmorell wrote:
Actually I am trying to do this:

http://railscasts.com/episodes/74-complex-forms-part-2

Any ideas on how to do that with hobo?


On Feb 22, 1:25 pm, atmorell <[email protected]> wrote:
Hello,

I have a form that is used for creating a Message. The Message model
creates a MessageCopy on save to the recipient(s). What would be the
best approach to add multiple recipients? (Ajax) I thought about
creating a temp model for storing the selected recipients, but that
would give me stalled unused records if the user does not send the
message. (close browser)

Recipients
  User3 remove-button
  User8 remove-button

Message:
form
  recipient <--- field with autocomplete.
  subject
  body

I kinda got it working by creating a form that submits the
autocompleted recipient in a session variable. (Array) It's not pretty
as I had to build some logic so that the user can't add the same
recipient twice, self etc.

Any suggestions?

Best regards.
Asbjørn Morell


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