Hiding a Hyperlink in a Database

Hi,
I have created a database and am using it in a list. One of the fields is a hyperlink to YouTube videos. I’m trying to find a way to “hide” the hyperlink and have the user press on a button in the selected row.

Any thoughts?
Jeff

If you mean that you want a button to redirect you to that link instead of showing a hyperlink, You can place a button then assign onClick function. Inside it you can use Wix-Location and use the value from the database - The Link - as the path of wixLocation.to().

For more information on how to use wixLocation, take a look Here

Best,
Mustafa

Mustafa,

I have the following code to display videos (see below) in a list. The last field in the list is a hyperlink. If no filter is used then the video list appears in LIFO order. If the filter is used it displays the selected videos. At this point you must click directly on the Hyperlink, which is partially displayed, to go to the URL. Even though videos are displayed they are not selected. The color does change when you hover, but in order to go to the URL you would have to click on that item’s hyperlink. My problem is that I want to hide the hyperlinks and only show buttonS in their place. I don’t see how wixLocation.to() picks the particular record. Below is a screen shot example.

Thank you for your input.
Jeff

import wixData from “wix-data”;

let debounceTimer;

//search by title

export function input1_keyPress(event, $w) {

if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(() => {
filter($w(‘#input1’).value,);
}, 200);
}

let lastFilterTitle;

function filter(titleAndPresenter) {

if (lastFilterTitle !== titleAndPresenter) {
let newFilter = wixData.filter();
$w(‘#dataset1’).setFilter(wixData.filter().contains(‘titleAndPresenter’,titleAndPresenter));
lastFilterTitle = titleAndPresenter;
}
}