Example editor use for multiple number spinners?
Example editor use for multiple number spinners?
I'd like to have an editor that includes a row that captures 4 numeric values using a number spinner for each of the values. I have constructed a number spinner that works on a page standalone, but am struggling to put it together in an editor. The layout needs to be something like:
Purge Older than: Years: [0] Months: [0] Weeks: [0] Days: [0]
My current efforts have resulted in a field that seems to wrap the four individual numeric fields.
Before I get into the depths of what I have tried, I was wondering if anyone had an example of capturing > 1 value on a single editor row using a custom control?
Replies
Forgive my ignorance - what is a number spinner? Are you trying to create a custom field input type? If so, this development guide might be of some use.
Allan
Thanks for asking .. the basis for it is http://www.jplugins.net/bootstrap-spinedit/?demo
Yes I have been following the guide you reference, but something is not playing nicely. The implementation of the custom input is shown below .. as you can see there are 4 controls to capture years, months, weeks and days and their values are get/set via an array. But my issues are more to do with all the controls being wrapped by an outer field
and the spin buttons for each individual spinner not being rendered.
I'll try to get a reduced sample of the whole thing if no immediate ideas?
You could use
input type="number"
element which might be a little easier? You can set attributes using theattr
option of thetext
input. Browser support for this input type is pretty good now.Allan