AshPhoenixForm not executing action on submit
Hey, i'm not sure why but when i submit a form for my update action it is not executing any update query
Am i missing something? i was following this example https://github.com/team-alembic/realworld/blob/main/lib/realworld_web/live/editor_live/index.ex#L24
GitHub
realworld/lib/realworld_web/live/editor_live/index.ex at main · te...
A fullstack Phoenix LiveView application with backend built with Ash Framework - team-alembic/realworld
Solution:Jump to solution
shouldnt it be like this?
```
def handle_event("save", %{"form" => form_data}, socket) do
case AshPhoenix.Form.submit(socket.assigns.form,...
9 Replies
This is the only thing i see in the logs when submitting
Try adding 'force?: true' to the submit options
By default invalid forms are not submitted
So you can check for errors on the form as well
I added a new helper
AshPhoenix.Form.raw_errors
to help debug these kinds of things.still doesn't submit save and there are no errors 🤔

Add
for_path: :all
to the raw errors optionsstill 😅
🤔
So it's getting to the error case I assume right?
Can is see your full code where you are inspecting those errors?
this should be the full code for that form:
and iirc it was getting to the success case that's why i was finding it weird that the changes arent saved and there is no query in the debug logs
and this is the form
Solution
shouldnt it be like this?
or
this was the issue thank you so much 🙏 i was too focused on the save that didnt notice the validate was using the wrong params