I have 5 input fields in a phoenix template which all have a max length of 1.
Essentially, I would like these 5 input fields to behave as if they were one.
Here is a JS example of what I am trying to achieve: Edit fiddle - JSFiddle - Code Playground
But there are 2 problems with the example above:
- Backspace does not return to the previous input
- The switch to the next input is not instant, making the feature faulty when the user is typing fast
Considering those, how would I achieve this in Elixir/Phoenix?
Note: I am not currently using LiveView, but if that would help with the solution then I would like to implement it.