Hello colleagues,
i might be looking to implement form creation from the front end i.e. particular users to be able to create dynamic forms like polls etc. My idea was to use some sort of javascript library ( i prefer not to) but if there is a better way of handling it (the phoenix way) i would rather do it.
Just a general example would be a user logs in the site, create a form and publish it so unregistered users to be able to visit and submit answers.
Any advice would be appreciated.
regards,
Peter
The only idea I have is, make the users think they’re building HTML forms but build up a JSON representation on the front-end which you then send to the back-end and “materialize” later.
Thanks guys. My solution is closer to what @krasenyp has suggested. Since i want to keep the Phoenix validation options i would rather create the form using json from the user input and either write custom components or functions to benefit from the form validations. Then keep the form id, user id and push the data to a json field in postgres. The user backed data representation would be a bit heavier since it will have to collect → convert → display the results and eventually filter them but i would guess that will not be huge deal for elixir.