Hacker News new | ask | show | jobs
by conradfr 1265 days ago
All web frameworks fail with forms one way or the other :)

I think one point would be the docs, to outline the basic cases, best practices. Maybe something tying the form helpers and changeset together.

I have a side project [0] with a form which have inputs dependant of others and a dynamic section (assoc).

I struggled a bit with the data, checking what I would get inside a changeset struct, until I "discovered" get_field and put_change.

For the assoc I was also a bit lost until I read an article using a delete virtual field. In the end I made it work but I still not sure I used all the right changeset functions.

To LiveView credits this app has been used all over the world and got very good feedback, nobody mentioned any lag issue etc (well, someone with a crappy connexion in Istanbul once got an incomplete uploaded file without getting an error).

[0] https://github.com/conradfr/FunkyABX