Skip to main content
Topic: Bug in Custom fields (Read 3462 times) previous topic - next topic - Topic derived from Custom fields and privacy
0 Members and 1 Guest are viewing this topic.

Bug in Custom fields

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

Re: Bug in Custom fields

Reply #1

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.
Bugs creator.
Features destroyer.
Template killer.

Re: Bug in Custom fields

Reply #2

I see. Is it possbile to write code that checks if this field is once changed during registration?

Re: Bug in Custom fields

Reply #3

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. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: Bug in Custom fields

Reply #4

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.

Re: Bug in Custom fields

Reply #5

Tracked: https://github.com/elkarte/Elkarte/issues/2239

If possible without too many efforts for 1.0.6, otherwise 1.1. ;D
Bugs creator.
Features destroyer.
Template killer.


 

Re: Bug in Custom fields

Reply #7

Thanks for tracking this ;) I'll test it tomorrow

edit: there will be a 1.0.6 release with this included?
sorry for my bad english

Re: Bug in Custom fields

Reply #8

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... :-\
Bugs creator.
Features destroyer.
Template killer.

Re: Bug in Custom fields

Reply #9

After a couple of weeks I can say it works, all new registered users have custom fields completed. Thanks!
sorry for my bad english

Re: Bug in Custom fields

Reply #10

Great! :D
Bugs creator.
Features destroyer.
Template killer.