错误:UserField“注册后可编辑”自动强制“注册时显示”

When creating a user field (UserField) in the admin panel, there is a sequence-dependent behavior:

  1. Initial state:

    • “Show on signup” is checked by default
    • “Editable after signup” is unchecked
  2. Sequence A:

    • First uncheck “Show on signup”
    • Do not check “Editable after signup”
    • :white_check_mark: Saves successfully: the field is neither shown on the signup form nor editable after signup
  3. Sequence B:

    • First check “Editable after signup”
    • Then try to uncheck “Show on signup”
    • :cross_mark: Frontend automatically re-checks “Show on signup” when you uncheck it
1 个赞

I don’t think it’s a bug. It’s intended to work that way. But I agree it would be helpful if this was possible

Just to clarify — the bug isn’t about these options being mutually exclusive.

The real issue is: originally, a field can have both “Editable after signup” and “Show on signup” unchecked. But once you check “Editable after signup” even once, the frontend enforces that at least one of these two options must be selected from then on.

This behavior is sequence-dependent.

2 个赞

Fields that are optional but not editable need to be on the signup form, or they can never be filled in

The goal of the current implementation was to prevent admins from creating a user field that is neither editable nor shown on sign up. So if something is a bug, then it’s that you can still create the field without these properties. I would prefer if instead of fixing that, the @team would consider the use case of staff-only user fields and fulfill that feature request. That’s why I posted in the feature topic.

2 个赞