Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link as custom field type #308

Open
Inspirementt opened this issue Feb 9, 2024 · 1 comment
Open

Link as custom field type #308

Inspirementt opened this issue Feb 9, 2024 · 1 comment
Labels
Feature Request New feature or request

Comments

@Inspirementt
Copy link

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
A link type as a custom field. For example, I've added an ASIN field for filaments so I can find the exact spool on Amazon if I want to order more. A direct link could then be easily constructed from this as "https://www.amazon.com/dp/[ASINnumber]", and you could then use that link to go straight to the Amazon listing for the filament. I'm sure many other marketplaces also support constructing direct links from a base URL and their article numbers.

In the custom field creator you could enter a base URL value and in the UI when you edit the value for the custom field you would enter, in this case, the ASIN number. So...

In the settings page when you edit the custom field:
image
([AN] stands for article number, but having something more generic might be better, not sure what placeholder should be used)

In the filament create/edit page:
image

Behind the scenes, the base URL and the article number would then be parsed and the [AN] part of the URL replaced by the actual article number, producing:
image

If you wanted to get really fancy, regex might also be implemented for URLs with more complex parsing. Might also be useful to have the link parser be able to pull in dara from other fields by their key, like in my Amazon example, as I already have a field with the ASIN number and the key "asin" I could add a Link field with the base URL "https://www.amazon.com/dp/[asin]" to pull in the value of the custom field with the key "asin"

Describe alternatives you've considered
What I'm doing now, which is to simply have the ASIN as a regular text field, then copy that into the search box on Amazon. Works, but could be more streamlined.

Additional context
I'm sure people could find many more creative uses for this feature than just this one thing.

@Inspirementt Inspirementt added the Feature Request New feature or request label Feb 9, 2024
@atl285
Copy link

atl285 commented Apr 24, 2024

You can use the type Text, which will be displayed then as a link, if the content is a link.

field_type_link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants