Link user field type

@tobiaseigen has a usecase with custom fields where he’s importing the name of an organisation, and a url, via sso, and wants to display it as a link with the name linking to the url. I can’t imagine user fields of this type - a url and a name - are a want unique to him.

It would seem sensible to me to add a new user field of the type Link, which accepts a name and url, and displays the name linking to the url.

No custom user field currently has two input boxes (at least, not that I’m aware of), and so I’m not sure what the most eloquent solution would be for this. I wonder if it might be to make the Link field type literally link other fields together. So, you’d have a form something like this:

There has been some similar discussion before:

However this only works with one supplying some sort of username, and a base url common to all of the values of the field (which we don’t have here)

Also this:

However, the about me field doesn’t allow easy adding of links via sso

Would a PR be welcome?

1 Like

I’m questioning if I’ve had a little bit of a brain fart.

I’m wondering if the field link shouldn’t be a field itself, because its values are going to be the same for each user, and so not displayed on the signup form or in the user preferences. But then again it’s going to be presented as a field in every other way (like on the public profile, and user card, if selected).

Some direction here would be invaluable.

1 Like

That is a LOT of fields for link. Why does it need so many fields?

Because it seemed simpler than changing the current fields architecture to support multiple inputs per field (and so also multiple user.custom_fields per field). The name of an organisation and the url of an organisation are separate pieces of information, and so separate fields, we just want to display them together as the link not-really-a-field-but-displayed-as-such.

Also I’ve realised that the Editable after signup? and Required at signup? options are unnecessary because the field wouldn’t be displayed at signup, or in a user’s preferences (which makes me think this shouldn’t be a field, but what instead…? A field view? :tractor: :deciduous_tree:).

1 Like

We are fine to do something here, just need to nail down a UI we are all comfortable with.

1 Like