pfaffman
(Jay Pfaffman)
12 فبراير 2019، 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)
12 فبراير 2019، 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)
12 فبراير 2019، 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)
12 فبراير 2019، 9:38م
4
To you or the end user, pretty sure @david tested this.
david
(David Taylor)
12 فبراير 2019، 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)
12 فبراير 2019، 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)
تم إغلاقه في
14 مارس 2019، 10:53م
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.