Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert input fields expecting a number to type=number #50

Open
jcoliz opened this issue Jun 1, 2020 · 5 comments
Open

Convert input fields expecting a number to type=number #50

jcoliz opened this issue Jun 1, 2020 · 5 comments

Comments

@jcoliz
Copy link

jcoliz commented Jun 1, 2020

Portfolio value up/down control only moves the number by $1, which seems unhelpful in this context. I suggest $100k as a more realistic increment that users might actually be adjusting their value.

Or for consistency, it could just be removed. It is the only value on the entire page with an up/down control.

@alistair-marshall
Copy link
Owner

I had never noticed before. When looking on my phone, it doesn't give arrows, but does default to a numeric keypad - which is more usefull.

I think it would be better to convert all the fields that are supposed to be numeric to a similar format (input type="number")

Unforutnatly, looking at the documentation, it looks like if you add a value for step (of say 100k), it does not allow the user to enter any value that is between the steps. So while clicking the up/down buttons would be quicker, the user would no longer be able to enter their real portfolio value.

@jcoliz jcoliz changed the title Portfolio value up/down control should increment in $100k increments, not $1 Convert input fields expecting a number to type=number Jun 3, 2020
@jcoliz
Copy link
Author

jcoliz commented Jun 3, 2020

Ok, good point about entering any value, I hadn't understood this consequence when I made the suggestion. Also, good point about type=number. I changed the issue title to reflect this.

@alistair-marshall
Copy link
Owner

Having said what I did earlier, I found an online tool today that does what we want. The 'Mortgage debt' and 'interest rate' values can be toggled up and down easily, but if the user enters a value between them, it is still accepted.

I haven't spent any time working out how they did it (if they did anything special at all), I just noticed it as I was using the tool. Perhaps the validation is not an issue.

@jcoliz
Copy link
Author

jcoliz commented Jun 4, 2020

It looks like they are using the novalidate attribute on the form tag to accomplish this.

@jcoliz
Copy link
Author

jcoliz commented Jun 4, 2020

Ok, I just tried this. The key for cFIREsim is the ng-step attribute on the input tag.

jcoliz added a commit to jcoliz/cFIREsim-open that referenced this issue Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants