NetTalk Central

Author Topic: Numeric fields have spinner control  (Read 3072 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Numeric fields have spinner control
« on: February 20, 2015, 10:21:05 PM »
Bruce,

     When adding a field to a form, I see Numeric and Spinner in the Type drop down.  When I choose Numeric, they all have spinner controls.  It seems to me I should only have a spinner control if I explicitly choose Spinner.  Is this by design?  I'm looking into setting a jquery option to turn off the spinner.  If this is a template feature, could you add an option to turn on/off the spinner for the Numeric field type?  NT 8.23.

Thanks,

Jeff

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Numeric fields have spinner control
« Reply #1 on: February 21, 2015, 05:24:57 AM »
Hi Jeff
What I have done even if the field type is a number is to set the form type to string,
In the string tab set the width based on how big the number could be and the picture to a numeric format e.g. '@n_3b'
In the validation check the numeric box which then allows you to set the low/high values
In the attached both the Order and field length fields are numeric but the field on the form is a string which will only accept numeric import between the limits set on the validation tab.

[attachment deleted by admin]
« Last Edit: February 22, 2015, 12:45:27 AM by terryd »
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Numeric fields have spinner control
« Reply #2 on: February 22, 2015, 08:50:04 AM »
Thanks Terry, definitely a good alternative.

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Numeric fields have spinner control
« Reply #3 on: February 23, 2015, 01:28:32 AM »
Hi Jeff,

>>   When adding a field to a form, I see Numeric and Spinner in the Type drop down.  When I choose Numeric, they all have spinner controls.

well yes an no. Some browsers display a Spinner control, others do not. the "Number" type maps to the HTML <Input type="number"> and each different browser can then display that according to the browser itself. I've not had a lot of joy with number - you can't control the formatting, and the browser does a lot of it's own stuff.

The "Spinner" type came later and is a spinner on all browsers. So if you want a spinner choose this. If you _don't want a spinner then go with Terry's suggestion and change the type to "String" (and you can set the format as well.)

>> It seems to me I should only have a spinner control if I explicitly choose Spinner.  Is this by design?

yes it's by design, just not my design <g>.

>>  I'm looking into setting a jquery option to turn off the spinner.  If this is a template feature, could you add an option to turn on/off the spinner for the Numeric field type?

alas no, I can't turn it off for "number". The best way to turn it off is to make ti a "String".

cheers
Bruce