jQuery UI Widgets › Forums › Editors › NumberInput › Provide option to allow empty input and placeholder text
Tagged: empty, jqxnumberinput, Number Input, placeHolder
This topic contains 4 replies, has 2 voices, and was last updated by fritzfrancis 9 years, 1 month ago.
-
Author
-
I’ve noticed with the jqxNumberInput that there is no way to use placeholder text because (1) the input cannot be blank, only 0, and (2) a placeholder setting/property would have to be provided.
On my page, I want to display to users a percentage representing a discount rate on a certain product. I also want to use jqxNumberInput to display a user’s “override” of that percentage. When the user saves the page, if the input has a value in it, that new discount percentage will be saved. But if the input is blank, then it does not make any changes. The inability to have the input be empty is preventing me from accomplishing this, and a placeholder saying something like “no override” or “none” would, in my case, be very useful.
In the meantime, I am simply using an HTML5
<input type="number" placeholder="none" />
, but I would love to use your widget if this functionality is ever added.Regards,
Fritz FrancisHello Fritz Francis,
If I understand You correctly maybe this example will help.
And if You prefer could make logic of button to be controlled by admin.
Feel free to ask again.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo,
Thank you for the demo, but unfortunately I don’t see how it at all relates to placeholders or allowing the input to be empty. Perhaps I didn’t explain myself well.
Consider this basic input element:
<input type="number" placeholder="no value" />
. It would be very nice if the jqxNumberInput could:
1. Allow the input to be blank, rather than always containing a number.
2. When blank, display placeholder text.Would you guys consider adding this ability in the future? I want to use your widget because of the many options it has, but can’t use it until it can do some of the basic things that a simple HTML5 number input can do.
Thanks,
Fritz FrancisHi Fritz Francis,
Please, take a look at this example.
Thank you for this feedback.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comThis is a pretty nice workaround! It doesn’t quite accomplish the same thing because resetting the “placeholder” value requires some event handlers, but this is close enough. Thanks!
-
AuthorPosts
You must be logged in to reply to this topic.