Hi,
i created a custom field (selection) and want to display its name and value (url) as a button in a template.
I already tried a couple of solution none of which worked.
I want something like SELECTION-NAME
I will attach a screenshot of the field. Please help me achieving that.
Thanks,
Daniel
Hi Daniel,
Thank you for contacting us and I'd be happy to assist.
You'll need the raw value of the saved URL from the select field, which can be acquired through the Types Fields API:
https://toolset.com/documentation/customizing-sites-using-php/functions/#select
For example, for the field with slug 'job-art', the HTML code for the link will look like this:
<a href="[types field='job-art'' output='raw'][/types]">SELECTION-NAME</a>
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
Thanks Waqar! I was able to figure it out with your help.
Would be great, if the Button-Block had this option.
Kind regards,
Daniel