Trouble with relationships and form
I have the following:
and I want to have a form to post a task. What should the ash form init look like ?
Currently I have
But this is giving me "task is required" error
I'm sure I must be doing something wrong and it has to do with the form init.
Could someone help ?
9 Replies
can you share the error, because I don't think it'scoming from that
This is my form for reference:
@Rebecca Le The error is "task is missing"
"task is required" sorry, in the form errors
right, because your form doesn't have any task fields in it
Should I use inputs_for ?
It feels odd that I need to do a user update form when I'm trying to create a task
indeed, that is kind of weird and I'm not sure why you'd do it that way
usually you'd have a form to create a task and then use
relate_actor
to relate it to a userah I never heard about
relate_actor
, maybe I'll check this out
I kinda wanna understand how to make my setup work without it, though
I'm mostly following the relationship docs in the ash docs
what if my relationship isn't about the actorthen yes, you'd probably use
add_form
to add a task form to the parent form, and use inputs_for
to iterate over the (one) task and render fields for itokay cool, I think I'm missing the
add_form
partSolution