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?

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

2
  • I created a new field with that expression, but it didn't put the whole link in there--only willcountysoa.com/propertysearch
    – Pfalbaum
    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.
    – Pfalbaum
    Commented Oct 15, 2020 at 2:50

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.