I have another problem with custom fields, I have a select box with some fields which is mandatory during registration, but users can still register without choosing a field. I think is a bug ;)
In the image below you can see the field is set to be be visible during registration and needed to be completed
A bug report is not a feature request. :P
Seriously, yes, this is something reported since the previous life, I thought this one was fixed a while ago, but I guess it slipped through... :-\
The "problem" is that a select box (and a maybe a set of checkboxes too? I don't remember.) is always considered "selected" because there is a "default selected option" (the radio buttons on the left of the inputs), that, even if it's not set, it's still considered to be set.
I see. Is it possbile to write code that checks if this field is once changed during registration?
The first step is to give an explicit option not to have a default, because at the moment you can use a trick, but it's not enough to be enforced at registration (I think).
The moment you have not set a default value, then you can force it to be selected at registration.
I don't have code handy, I should be able to have a look before night. ;)
I understand. My thought was to force the user to change the field from default option to another (or to the default option again). So ElkArte would be sure the user changed the field option.
Tracked: https://github.com/elkarte/Elkarte/issues/2239
If possible without too many efforts for 1.0.6, otherwise 1.1. ;D
https://github.com/emanuele45/Dialogo/commit/6d010104884895e1121f29a36587353b06ebaa70
Any test is welcome! O:-)
Thanks for tracking this ;) I'll test it tomorrow
edit: there will be a 1.0.6 release with this included?
There is a tracking for a 1.0.6:
https://github.com/elkarte/Elkarte/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0.6
it will contain the code I posted.
But the code is not really that tested, so it may or may not work.
For example, one thing I forgot to test, is how (if) it works in the profile area... :-\
After a couple of weeks I can say it works, all new registered users have custom fields completed. Thanks!
Great! :D