An option for user field to be hidden in sign up

AI-generated summary

The discussion is about hiding user fields during sign-up. hnaseri wants an option to hide specific fields for administrative purposes, but currently, this feature doesn’t exist. zogstrip suggested hiding fields with CSS, and Johani provided code examples to demonstrate this approach. To hide all custom fields, use the following CSS:

.invites-show {
  .user-fields {
    display: none;
  }
}

For a specific field, target its class, which is the field’s name in lowercase with spaces replaced by dashes (e.g., .user-field-work-experience). Then, add the following code to the theme:

.invites-show {
  .user-field-work-experience {
    display: none;
  }
}

We want some user fields that are specific to our own administration needs. We don’t want the user to see them in sign up. However it seems there is no such option right now.

3 лайка

Can’t you hide them with CSS?

I didn’t try. Does it hide a specific user field or all of them?

Если вы хотите скрыть все пользовательские поля на этой странице, добавьте этот CSS в вашу тему.

.invites-show {
  .user-fields {
    display: none;
  }
}

Если вы хотите скрыть конкретное поле, вы можете обратиться к нему через специальный класс, который мы добавляем.

По сути, это название поля, которое вы задали в панели администратора, записанное в нижнем регистре. Мы также заменяем пробелы на дефисы.

Например, «Work experience» превращается в

.user-field-work-experience

и вы можете добавить это в вашу тему, чтобы скрыть это конкретное поле.

.invites-show {
  .user-field-work-experience {
    display: none;
  }
}
5 лайков

Закрыто в пользу Site setting to hide custom user fields from signup page