NetTalk Central

Author Topic: HTML data entry masks  (Read 1447 times)

GordonF

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
HTML data entry masks
« on: May 21, 2021, 04:11:45 AM »
Has anyone used html data entry masks, I'm particularly thinking about dates and times so the separators such as / and : are fixed in the input and the entry moves from dd to mm to yyyy as the elements are filled, no need to type a separator. I understand how this can be done in html code but I'm uncertain where to place the mask details in a webserver form field definition.

Gordon


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11175
    • View Profile
Re: HTML data entry masks
« Reply #1 on: May 23, 2021, 08:48:44 PM »
Hi Gordon,

Using masks limits the values that can be entered.
In NetTalk time and date fields are "put in whatever you like" form.
So, for example a time field might be
15
15pm
3pm
3:00
3:00pm
and so on

dates are even richer, supporting not just all the obvious date formats, but also words like
yesterday
tomorrow
next wednesday
3rd quarter
and so on.

The idea that you have to force the user to use one single format is from a long time ago - these days it's better to simply interpret the format the user has used, and accept the data. Or to put it another way - computers should adapt to humans, not the other way around.

cheers
Bruce


Cheers
Bruce


GordonF

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: HTML data entry masks
« Reply #2 on: May 24, 2021, 07:54:31 AM »
I hear what you are saying and do agree you are correct under many circumstances. However, I do have a need to force standard full date entries in the UK dd/mm/yyyy format and I believe a mask would make it easier for the user, is there any facility for me defining a mask on a field within webserver, even if it wasn't originally intended for that purpose. Alternatively I can look at splitting the date entry into 3 separate entries.

Gordon



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11175
    • View Profile
Re: HTML data entry masks
« Reply #3 on: May 24, 2021, 10:07:35 PM »
<< is there any facility for me defining a mask on a field within webserver, even if it wasn't originally intended for that purpose.

no. You could force the date lookup - so then no entry required at all - that would have the same effect, but also (IMO) be a worse UI experience.

cheers
Bruce