Hi Alexander,
alexander wrote:
it´s not really that ror doesn´t support forms in forms… it´s the
browsers that don´t.
I need to understand more about the browser-side issue with this. Is it
that they don’t support behavior that’s allowed / specified by W3C? Or
does
the spec itself say this is inappropriate?
we had a problem a bit like yours. what we did is just place the
“subform” in athat was outside the other form and just positioned
it “inside” the other form later. that worked.The more I’ve thought about it, the more this seem like the ‘right’ way
to
approach the problem. Make the ‘containing’ form more of a visual
device
with respect to sub-form elements. Unfortunately, it seems to require
considerable expertise in CSS in order to grow / shrink the containing
form
dynamically based on the size of the sub-forms. Or maybe there’s an
easier
way to handle the positioning. If anyone has any knowledge to share on
this, I’d definitely appreciate it. My current level of CSS skill is
very
basic.At any rate…
The solution I came up with is to
- eliminate the containing form, using button_to to advance to the next
page- put each checkbox (still bound to the model) inside a
with an
accompanying observe_field that- causes RJS-based update of the summary record and create / delete
activity for the related individual records.The use of the checkbox, rather than checkbox_tag allows initial
population
of the checkboxes based on the values in the summary record.
Eliminating
the containing form meand