7 years ago
Topic

Hello,

Is it possible to have a field that can add <a href</a> in back end? I have a field where I ask user to input web address for medical publications that I would like to change to an actual link in the content and Intro view.

Many thanks

Fernand

Get a Book for SEBLOD
1283 Posts
Bucklash
7 years ago
4
Level 1

Hi

You can just use Typo -> html option in your view  

<a href="/$cck->getValue('some_field');">$cck->getValue('some_field_again');</a>


or use beforestore field from Codepack plugins to alter the value before it is stored.



7 years ago
3
Level 2

I tried but it did not work. Should I copy and paste the code you provided in it's entirety or should I change some of it?

4229 Posts
Kadministrator
7 years ago
2
Level 3

You should change field names to match your fields.

7 years ago
0
Level 4

Thanks Klas. Almost working but the issue now is that it is adding my site domain right before the external link that was inputted.

www.mysite.com/https://externalsite.com

7 years ago
0
Level 4

I removed the "/' and now it is working. Thank you Bucklash and Klas for your help.

Get a VIP membership