pfaffman
(Jay Pfaffman)
2019 年 2 月 12 日午後 9:30
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
sam
(Sam Saffron)
2019 年 2 月 12 日午後 9:35
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
pfaffman
(Jay Pfaffman)
2019 年 2 月 12 日午後 9:36
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)
2019 年 2 月 12 日午後 9:38
4
To you or the end user, pretty sure @david tested this.
david
(David Taylor)
2019 年 2 月 12 日午後 9:45
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
pfaffman
(Jay Pfaffman)
2019 年 2 月 12 日午後 10:53
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
system
(system)
クローズされました:
2019 年 3 月 14 日午後 10:53
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.