I would like to have a text input where if someone enters the number 8, the field would update to 0.08. If they then entered a 4, it would update to 0.84. If they then entered a 5, it would update to 8.45, enter a 7 and it would update to 84.57, etc.
Essentially, input would feed to the left and always maintain 2 decimal places.
I can vaguely recall doing this with javascript, so I am pretty sure this is doable.
I actually think I might have found an Axure bug while trying to get Method 2 to work. Perhaps @BenHoang_Axure or another of his esteemed colleagues could take a look and tell me if I’m doing something wrong.
These examples are great! Thanks for including those explanations in the attached file. It’s awesome to see the pros and cons of each method as well.
You’re right about the bug and it’s an interesting one… You’re probably using a Mac, is that right?
We’ve been looking into this issue where on Mac keyboards the backspace key (actually the delete key) registers as delete but traditionally functions as backspace.
Of course, this can already be something quite confusing to us when trying to understand that sentence alone… but when trying to translate conditional key down logic between Mac and Windows keyboards, this is how the bug happens.
On other keyboards, there’s a dedicated backspace key and delete key. So in text fields both Mac and Windows keyboards fire as backspace. However in Axure RP , conditional logic will register Mac keyboards as delete.
I’ll bump our filed bug report for this issue to see if it can gain some more traction. In any case, here’s the attached file with the key up condition that has “Back” instead!
Yep, I’m on a mac. I tried the generated prototype on my PC, but I hadn’t thought to build the logic from there, where it could correctly register backspace instead of delete. Thanks!