Smart Field With URL

Hello everyone :slight_smile:

I’m creating a field that gives me an URL, but it’s just a string that I can’t click, and I want to be able to click, not have to copy and paste.

That’s my code, I tried to add HTML like <a… but not succeded.
This is being done on forest/user.

 {
      field: "Devices",
      get: (User) => {
        const devices = `https://app.forestadmin.com/Walkie/Production/Operations/data/dd9eb2f0-d014-11ea-b9f9-95816f5add68/index?filterType=and&user:_id[0][val]=${User._id}&user:_id[0][op]=is`;

        return devices;
      },
    },

Expected behavior

The link:
https://app.forestadmin.com/Walkie/Production/Operations/data/dd9eb2f0-d014-11ea-b9f9-95816f5add68/index?filterType=and&user:_id[0][val]=${User._id}&user:_id[0][op]=is

Actual behavior

Just the string:
https://app.forestadmin.com/Walkie/Production/Operations/data/dd9eb2f0-d014-11ea-b9f9-95816f5add68/index?filterType=and&user:_id[0][val]=${User._id}&user:_id[0][op]=is

(Just realize that here transform as a link already, but on Forest, you cannot click.

Context

Please provide any relevant information about your setup.

  • I have the premium version of forest.

Hi @Isadora_Rebelo,

The link widget does not suit your need ? You should be able to set it on your smart field settings:

image

image

If that does not work, could you make a small Loom video clip of your issue ?

1 Like

I was paying so much attention to the code side that would never have got there haha.

Solved, thanks a lot!

2 Likes