pfaffman
(Jay Pfaffman)
February 12, 2019, 9:30pm
1
I have a bunch of user custom fields from an import. I would like only one of them to be included on the login page. When I look at the CSS, the different fields are tagged with only an ember-xxx
tag. Is it safe to use those tags to target individual fields or are they likely to change if . . . something … changes?
Edit: Or if there were a way to make a user custom field as “hidden from user” that would be another solution to the problem.
1 Like
sam
(Sam Saffron)
February 12, 2019, 9:35pm
2
Pretty sure that if you define a user field in admin and tick nothing, it will not show up to end users. We implemented that a few months ago.
1 Like
pfaffman
(Jay Pfaffman)
February 12, 2019, 9:36pm
3
That’s what I thought, but all the fields are un-checked and they all show up on the new user page.
sam
(Sam Saffron)
February 12, 2019, 9:38pm
4
To you or the end user, pretty sure @david tested this.
david
(David Taylor)
February 12, 2019, 9:45pm
5
We serialize all user fields for staff members, and for the user themselves
I think @pfaffman is talking about the signup modal, where we always show all fields.
Short answer: no
The slightly safer method, if this is for a specific site, would be to use the nth-of-type selector
.user-fields div{
display: none;
&:nth-of-type(2){
display: block;
}
}
I think a PR to add data-field-name=blah
to the div elements would be welcome.
4 Likes
pfaffman
(Jay Pfaffman)
February 12, 2019, 10:53pm
6
Thanks, @david ! That wasn’t quite right, but it was enough to get me there. Here’s what I did:
.create-account .user-fields .user-field {
display: none;
&:nth-of-type(10){
display: block;
}
}
4 Likes
system
(system)
Closed
March 14, 2019, 10:53pm
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.