0

I have a string field called PIN. And I have a string field called PIN_SOA which has URLs.

enter image description here

I'm creating a webmap using qgis2web 3.16. I have popups enabled, and of the two mentioned fields I only want to see PIN in the popup, not PIN_SOA. Here's how it looks now:

enter image description here

Is there a way to make PIN a hyperlink that opens the URL of the associated PIN_SOA field? For example, I want it to look like this:

enter image description here

I'm referencing these similar questions. QGIS - Convert a text field to a clickable hyperlink, hotlink, or URL?, Configuring URL link for popup window directly in qgis2web plugin?

asked Oct 14, 2020 at 4:17

1 Answer 1

1

You can use a third field to show the link.

Creating a new field with an expression like this:

'<a href='+ "PIN_SOA" +'>'+ to_string("PIN") +'</a>'

The link will remain the same link, you just style it in a way that is comfortable to you.
To prevent some fields to be shown in the popup I would copy my layer to a virtual layer and use the new temp layer with only the fields you want in the popup.

enter image description here

answered Oct 14, 2020 at 6:35
2
  • I created a new field with that expression, but it didn't put the whole link in there--only willcountysoa.com/propertysearch Commented Oct 15, 2020 at 2:39
  • Update: It didn't put the whole link because I didn't make the field length long enough. Commented Oct 15, 2020 at 2:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.