Fixed Setting Minimum Number contraint on *optional* custom field defaults value


Well-known member
Affected version
I have a custom field which is for entering a year. Given the nature of this year, it is only valid for 1991 and after. However, the field is not required, and not applicable for several members. So, what I want to have happen is have the field be blank on registration page, but if the user choses to enter a number, have the constraint take effect. Therefore I have set the field to be optional, however XF tries to be smart and defaults the value to the minimum, which is not what I want or would expect, given this is an optional field, and even if it weren't optional 99% of users will fail to update it if it's already pre-populated, so it would be better to default to blank to force the users to enter a value, then XF can complain if it isn't greater than the minimum.
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.3).

Change log:
Support a "default" value for numberbox elements that isn't overridden by the "min" value particularly important for custom field values.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
Top Bottom