Possible to limit data type in textline attributes?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello,

Is it possible to limit the data type of an attribute to be integer-only?

We want to create a set of attributes to store information on our subscribers related to their skills, such as

“Please rate your experience with Hydraulics / Pneumatics on a scale of 1-10”

I think the easiest way to set this up would be to add a textline attribute that would only accept integers between 1-10. Is this possible?

Another option would be to use an attribute of type = select, but we actually have 32x of these attributes related to different skills, and adding these as “select” types 32x times would be a pain to say the least. Especially if we ever want to make a change to the option boxes and we’d need to change it in 32 places…

fwiw, this is the google form we’re deprecating as we move from google spreadsheets into phplist:

Please let me know if there’s any way to limit the data types of a textline attribute or if you have any other recommendations on how to add these attributes to phplist.

Thank you,

Michael Altfield
Senior System Administrator
PGP Fingerprint: 8A4B 0AF8 162F 3B6A 79B7 70D2 AA3E DF71 60E2 D97B

Open Source Ecology

-----BEGIN PGP SIGNATURE-----

iQJSBAEBCgA8FiEEiksK+BYvO2p5t3DSqj7fcWDi2XsFAlwWFk8eHG1pY2hhZWxA
b3BlbnNvdXJjZWVjb2xvZ3kub3JnAAoJEKo+33Fg4tl7rEQQAIFxhfu5PdS4cFlx
hPlJH9s6IDF2s2KlBMETYyMpysMqtpPxNHSLoM49tWdmxzotX3y3XOS6jNe5sfQY
WTojqT/ngXxJc9XnvqJSBsIyG9WkKgDxmu+1r91PgjVklMMKDiQVTKvjWgyq6lb3
tSBTbBvQpvzWRZOklc3qivgTyWtryi2Hk+VM283e4EJZZU8h82VleoyMzp/vMzfb
JNJ1/pZwZjVXAVqzYmwOBWfbsfqxmMijAsAQrxUyxn/Rsc2gV6aFlG2T7gUzPpXW
AAz8ygJAJerRu28mPKPhIAa7iv4+8Sqii5jGjZFgvXDg/bG6Vo4TevudOBu9bUa2
LyOwCxAH7hLbmWWu54NjATq0cPcPNztdDhHTUkZwj75OCepQ8Ml+wnVMMKAyQOmb
5SaAaYqkj15/kqfBBXjxfvH+prjfHWVS5rD+9ecBgGXqd+XfdevlZVEmcAjOIuTG
gb9LtJfmuEhNnAIfjUsZu8fkkyb68xjcVZZAAgV7mSLMEwN6vcr0SeeLej7s4yUj
+f98eajrCNIoofq4pHko4xU7mDBwHa7sWnngQ6+dG5kGbHl70T5CWCl2pZfDJfaq
5bH47fi1ctqRe206RMZ7FaeDfvoplVq/sE1iQr+5Ad5m3u+/bLZpgukMLD75IBlH
1hgDZMGCQeNLj0FIfyeRMJpbNGFg
=K+mA
-----END PGP SIGNATURE-----

@michiel May know about the enforceability of attribute data types

There’s no standard mechanism yet to enforce the content, but you can write a quick plugin, that does that. Check out the example plugin how to make that work.

1 Like