”member only” for a download button on dynamic item page

Hi,
I have been searching around about this topic but i cant find a clue.

Here is my situation:
I now have a page http://www.red-sound.com/free-guitar-tab which contain a table linked up to a dataset
when i click a song title lets say ”Air”, it goes to the item page https://www.red-sound.com/TAB/Air , everything looks fine so far.

Here is what i want:
when you scroll down the item page you will see a download button, now everyone can click and download. But I want to collect emails of the user who download the document. So i wanna have the download button set to “member only”, and everything before ”download” stays Public.

Can anyone give me a clue about setting up member aera like yhis situration??

Thank you!!!
Kit

You will have to import wix-user and check his role (look up API-doc for this)The you add something like

if (role =“Member”) {
$w(“#button1).show();
}
else {
$w(”#button1).hide();
}

is there any other method doing it without coding??

No.

You have to use code, but it’s simple as you can see in Giris comment.

Liran.