Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Leading Zeros in Text Fields

Leading Zeros in Text Fields 4 years 2 months ago #80968

  • jlazerus
  • jlazerus's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Is there a way to keep a full number with a leading zero? It keeps dropping the zero at the beginning and I need it to show up.
The administrator has disabled public write access.

Leading Zeros in Text Fields 4 years 2 months ago #80969

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 83
  • Karma: 37
Yes, don't use a number field. Use a short text or multiple short text. If you want it to be numeric but with leading zeros, use a regular expression validation like /^[0-9]*$/ to ensure that only numbers can be entered, rather than using the advanced question option "only numbers".
Last Edit: 4 years 2 months ago by TMSWhite.
The administrator has disabled public write access.

Leading Zeros in Text Fields 4 years 2 months ago #80970

  • jlazerus
  • jlazerus's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Awesome, thanks.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.190 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form