Set Link Text for this field.

Created on 23 September 2020, about 4 years ago
Updated 6 November 2023, 11 months ago

Problem/Motivation

I need users to be able to create a 'button' on a node by entering a URL or link however I don't want them to select the Link text themselves. I would like all the 'buttons' to have the same Link text. I was hoping to leverage the link field to be able to validate the URL's and just set a default Link text. However you can not have a default link text without a default URL and then if I was to make the Link text disabled then you can't see the text which is going to be used. I am also using Layout builder and can't seem to see a way to set this on output?

Proposed resolution

The ability to either set the Default Link text in the form or to be able to set it when it gets output. I could not find a simple way to set the Link text for this particular field. Possibly I should be using a preprocess function or maybe editing the template for the field?
I was hoping someone could point me in the right direction to be able to accomplish this.

πŸ’¬ Support request
Status

Closed: outdated

Version

9.3

Component
LinkΒ  β†’

Last updated 2 days ago

Created by

πŸ‡¦πŸ‡ΊAustralia tisteegz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024