# Hyperlink inside database table???

**URL:** <https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [February 24, 2018, 4:00am UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821 "2018-02-24T04:00:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanette-hyacinthe](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/shanette-hyacinthe/32/2184_2.png) [@shanette-hyacinthe](https://forum.wixstudio.com/u/shanette-hyacinthe)\
**Post date:** [February 24, 2018, 4:00am UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/1 "2018-02-24T04:00:17Z")

</div>

Is there code to make a text inside a table from a database be a hyperlink?? My idea is to have a list of websites in a table form that constantly updates (this is where the database comes in) and website visitors will click on the link to be taken to the desired site.

I made the database, but I dont know how to make the website link an actual hyperlink… currently its just reading as text since its coming from the database.

Can anyone help?

---

<div class="post-metadata">

**Author:** ![shlomi-shemesh](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@shlomi-shemesh](https://forum.wixstudio.com/u/shlomi-shemesh)\
**Post date:** [February 25, 2018, 8:44am UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/2 "2018-02-25T08:44:23Z")

</div>

Hi,

is the hyperlink separated from other text? if so, did you try using url as the db type for the column data?

Shlomi

---

<div class="post-metadata">

**Author:** ![bruce-rawiri](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bruce-rawiri/32/2542_2.png) [@bruce-rawiri](https://forum.wixstudio.com/u/bruce-rawiri)\
**Post date:** [March 14, 2018, 9:10pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/3 "2018-03-14T21:10:56Z")

</div>

Hi All. I am trying to acheive the same. I have 4 columns. Firstname, Surname, Suburb, Link. I have added a search to find the persons details in the database and return the results of search in a table. This is working just fine and search results works fine. HOWEVER, the last column LINK, is a Hyperlink to a external web page address, which loads completely seperate information.  
How do I make the Link Coloumn a Hyperlink to a specfic External Address?  
Also per in the database has a different Hyperlink and it is a fixed address, so it does not change for each person.  
I do not know code so just seeking some help with this challenge  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![genry-manashirov](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/genry-manashirov/32/793_2.png) [@genry-manashirov](https://forum.wixstudio.com/u/genry-manashirov)\
**Post date:** [March 15, 2018, 4:41pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/4 "2018-03-15T16:41:13Z")

</div>

Hi Bruce.

Can you share a link to your website?

Regards,  
Genry.

---

<div class="post-metadata">

**Author:** ![bruce-rawiri](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bruce-rawiri/32/2542_2.png) [@bruce-rawiri](https://forum.wixstudio.com/u/bruce-rawiri)\
**Post date:** [March 15, 2018, 7:26pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/5 "2018-03-15T19:26:33Z")

</div>

Hi Genry. thanks for reply. not entirely sure what you mean by share a link to my website?  
in the table results is a column that has a url web address to a different external Forms workflow website which loads the persons details as part of a existing registration process for events.  
all i need the search result to do is find my name, (or anyone who searches) and show the results in the table which includes there url link to go to external web address once they click the column  
hope that is clearer.  
it does not matter if someone else sees the link during the search as it is not secure or private  
thanks and hope for some help

---

<div class="post-metadata">

**Author:** ![shlomi-shemesh](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@shlomi-shemesh](https://forum.wixstudio.com/u/shlomi-shemesh)\
**Post date:** [March 15, 2018, 7:31pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/6 "2018-03-15T19:31:40Z")

</div>

Hey Bruce,

Did you try using repeaters rather than a table to display the results? Can you share the url of the site you are working in? Will be easier to have a look at what you are describing

Shlomi

---

<div class="post-metadata">

**Author:** ![bruce-rawiri](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bruce-rawiri/32/2542_2.png) [@bruce-rawiri](https://forum.wixstudio.com/u/bruce-rawiri)\
**Post date:** [March 15, 2018, 8:28pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/7 "2018-03-15T20:28:59Z")

</div>

Hi Shlomi. I am now to coding and I am not sure what Repeaters are at this stage, i will read and learn and maybe that could be a better option. I understand now that it is better to see the page. I have made it live so you can what I mean as per my comments earlier in the thread. Here is link to site.  
[https://www.ghostfishing.co.nz/search](https://www.ghostfishing.co.nz/search)  
Hope you can help or offer options of display content so there is a clickable link in the last column, and hopefully I can rename the link so you do not see the entire link  
thanks again  
Bruce

---

<div class="post-metadata">

**Author:** ![bruce-rawiri](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bruce-rawiri/32/2542_2.png) [@bruce-rawiri](https://forum.wixstudio.com/u/bruce-rawiri)\
**Post date:** [March 15, 2018, 8:32pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/8 "2018-03-15T20:32:04Z")

</div>

Sorry by the way, search for Bruce or cody or tawa. These will show some results

---

<div class="post-metadata">

**Author:** ![genry-manashirov](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/genry-manashirov/32/793_2.png) [@genry-manashirov](https://forum.wixstudio.com/u/genry-manashirov)\
**Post date:** [March 15, 2018, 8:37pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/9 "2018-03-15T20:37:21Z")

</div>

Hi Bruce.

I took a look at the structure of your collection. I think changing the ‘Link’ column type from _RichText_ to _URL_ should solve this problem.

Regards,  
Genry.

---

<div class="post-metadata">

**Author:** ![bruce-rawiri](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bruce-rawiri/32/2542_2.png) [@bruce-rawiri](https://forum.wixstudio.com/u/bruce-rawiri)\
**Post date:** [March 15, 2018, 8:53pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/10 "2018-03-15T20:53:07Z")

</div>

Hi Guys.  
I have tried using URL first Genry. I thought that would work and then I read article suggesting using Rich Text and use Link to link off to External Site. I have changed back to URL and sadly it is still now working.  
Is using repeaters for text boxes better?

---

<div class="post-metadata">

**Author:** ![genry-manashirov](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/genry-manashirov/32/793_2.png) [@genry-manashirov](https://forum.wixstudio.com/u/genry-manashirov)\
**Post date:** [March 15, 2018, 9:27pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/11 "2018-03-15T21:27:06Z")

</div>

Hi Bruce.

There is an alternative way to perform what you are trying to do.  
If you connect the table component to the collection (data-binding) - you can then set the filter of the dataset programmatically according to your search.  
You can initialize the dataset filter to return no result at first with some known no result condition.

Using data-binding, _URL_ columns should work as expected.

The reason _URL_ column type does not work using the current implementation on your site, is that there is no notion of _URL_ type column in the raw table representation, if it is not connected to a collection.

Hope this helps.

Regards,  
Genry.

---

<div class="post-metadata">

**Author:** ![genry-manashirov](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/genry-manashirov/32/793_2.png) [@genry-manashirov](https://forum.wixstudio.com/u/genry-manashirov)\
**Post date:** [March 15, 2018, 9:30pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/12 "2018-03-15T21:30:39Z")

</div>

Having said that, using the repeaters is giving you more flexible design to your search results.

Regards,  
Genry.

---

<div class="post-metadata">

**Author:** ![bruce-rawiri](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bruce-rawiri/32/2542_2.png) [@bruce-rawiri](https://forum.wixstudio.com/u/bruce-rawiri)\
**Post date:** [March 15, 2018, 9:43pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/13 "2018-03-15T21:43:29Z")

</div>

Hi Genry  
I have just inserted a Repeater and yes it does look good and will provide a little more flexibility for sure  
I guess the challenge now is to create the Search for the Repeater???  
Again I am not a coder so any help with the search will be greatly appreciated

---

<div class="post-metadata">

**Author:** ![shlomi-shemesh](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@shlomi-shemesh](https://forum.wixstudio.com/u/shlomi-shemesh)\
**Post date:** [March 15, 2018, 10:37pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/14 "2018-03-15T22:37:43Z")

</div>

Bruce,

in your page try the following code instead of binding the text of the link to the url column

```javascript
$w.onReady(function () {
	 $w("#repeater1").onItemReady( ($w, itemData, index) => {
	   $w("#text20").html = "<a href=" + itemData.hyperlink + ">" + itemData.name +"</a>";	
	});
});

```

please let me know if you can make it work. if you need further help with the search, please have a look on this forum for similar threads, or lets please open another new thread

thanks,  
Shlomi

---

<div class="post-metadata">

**Author:** ![bruce-rawiri](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bruce-rawiri/32/2542_2.png) [@bruce-rawiri](https://forum.wixstudio.com/u/bruce-rawiri)\
**Post date:** [March 15, 2018, 11:44pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/15 "2018-03-15T23:44:57Z")

</div>

Hi Sholmi  
Thanks again for your support. I still do not seem to be able to get it to work  
The problem is I dont fully understand code as I am learning and a lot of this is over my head  
The input search box element is called "input1  
Page is linked to Dataset called “MemberLink”  
search button is called “search”  
Please help me to make this work  
Thanks again  
[https://www.ghostfishing.co.nz/search](https://www.ghostfishing.co.nz/search)

Bruce

---

<div class="post-metadata">

**Author:** ![shlomi-shemesh](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@shlomi-shemesh](https://forum.wixstudio.com/u/shlomi-shemesh)\
**Post date:** [March 16, 2018, 7:41am UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/16 "2018-03-16T07:41:38Z")

</div>

Bruce,

use this in your code:

```javascript
import wixData from 'wix-data';

$w.onReady(function () {
	 $w('#repeater1').onItemReady( ($w, itemData, ) => {
	   $w('#link').html= "<a href=" + itemData.hyperlink + " target='_blank' style='text-decoration:underline;'>" + itemData.name +"</a>";	   
	});
});

export function search_click(event, $w) {
	$w("#dataset1").setFilter( wixData.filter()
	  .contains("name", $w("#input1").value)
	);
}

```

good luck,  
Shlomi

---

<div class="post-metadata">

**Author:** ![\_tim](https://avatars.discourse-cdn.com/v4/letter/_/e47c2d/32.png) [@\_tim](https://forum.wixstudio.com/u/_tim)\
**Post date:** [March 16, 2018, 3:28pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/17 "2018-03-16T15:28:40Z")

</div>

Hi Shlomi,  
Nearly there with my problem having read the above. I too need to show a hyperlink in a table that comes from my database. My code looks like this:

 ![](https://us1.discourse-cdn.com/wix/original/3X/f/4/f471e60c595bff626b912965bbf9412978e9ffd2.jpeg)  
and the database looks like this - the ‘link’ field is of type URL.

 ![](https://us1.discourse-cdn.com/wix/original/3X/5/4/541f55475f220df659acf9409f0fcc4c567f2e45.jpeg)

How can I get it to display as a hotlink, and not like this:

 ![](https://us1.discourse-cdn.com/wix/original/3X/0/8/08ef37128dc471196f5cd0ab0f7cdabc5da9b586.jpeg)  
Thanks, Tim

---

<div class="post-metadata">

**Author:** ![shlomi-shemesh](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@shlomi-shemesh](https://forum.wixstudio.com/u/shlomi-shemesh)\
**Post date:** [March 16, 2018, 3:38pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/18 "2018-03-16T15:38:50Z")

</div>

Hi Tim,

I strongly recommend you check out wix code repeaters and look into what Bruce did with his site

Shlomi

---

<div class="post-metadata">

**Author:** ![shlomi-shemesh](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@shlomi-shemesh](https://forum.wixstudio.com/u/shlomi-shemesh)\
**Post date:** [March 16, 2018, 3:41pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/19 "2018-03-16T15:41:21Z")

</div>

Please also check out this thread: [https://www.wix.com/code/home/forum/questions-answers/user-input-drop-down-sort](https://www.wix.com/code/home/forum/questions-answers/user-input-drop-down-sort)

---

<div class="post-metadata">

**Author:** ![\_tim](https://avatars.discourse-cdn.com/v4/letter/_/e47c2d/32.png) [@\_tim](https://forum.wixstudio.com/u/_tim)\
**Post date:** [March 16, 2018, 4:04pm UTC](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821/20 "2018-03-16T16:04:07Z")

</div>

Hi Shlomi,  
That’s great, I’ll try and work on code repeaters. I’m a real coding newbie, so just for the moment, how do I get the url in the database to display as a hotlink? Many thanks.

[Next page](https://forum.wixstudio.com/t/hyperlink-inside-database-table/28821.md?page=2)
