Hi, I have a form that has two drop down lists in it. I have an
observe_field for the first list, that updates the second list.
To better visualize this, the first list is country, the second is
Now all this works fine, the second list is basically a partial and is
called correctly and retrieves the correct data when the first list is
However, in my edit page, if i save the form only the first list value
is saved. The second list value remains the same even if i change the
value on the list.
Additionally, if i edit the record and only change the second lists’
value it saves the correct data!
Is there a problem with observe_field rendering partials in an edit
page that messes up the field values? I looked at the generated html
and it all looks the same. Any ideas?
Thanks in advance,
I’ve been trying to find an example of how to use this ‘double’
dropdown list box for the last months and never found an example.
Would you be so kind as to offer up a simple example of how you’re
approaching this? I would be most grateful as I have need to do the
‘category - subcategory’ entry for a project and have had to make it
very awkward to try to accomplish this.
I’ll post a working example as soon as i can, but i’m still having
problems saving the correct data.
I’m using a partial for the second drop down, so when the first drop
down is changed the observe_field kicks in and renders the partial
with the new list.
On Nov 3, 4:09 pm, “[email protected]” [email protected]
Hmm how about this example?
I tried this with 2 drop down lists, the first one containing a list
of publications and the second one containing a list of available
issues for the selected publication. Worked without any problem
Thanks for the link, i’ll try this later.
A small update from me; my original code works in ie6 and ie7! but my
development browser Firefox fails!!! I’ll look into this more and
report back once i have an answer.