If the user has entered data,,, hide button

hell everyone …
I want to know how can I hide button (enter your data) if the user has all ready entered the data?
and I want to know how to enter data for reference field through a form ?
thanks a lot

Following because I have the same question. I would like button 1 to disappear after click and button 2 appear after button 1 is clicked.

Hi Warda,

You can check if the Current user ID exists in the Database you used to store the data in, if (yes) hide it.
For more information about userId - Check this and for dataset query - here
regarding the refence field fill, check out this link

@charleswbingen Use the onClick function for button1 to hide button1 and show button2
so your code should look something like this :

$w(“#button1”).onClick(event,$w){
$w(“#button1”).hide();
$w(“#button2”).show();
}

And the opposite for Button2.

Best!

Mustafa

Mustafa
Thank you. I added that and it works consistently.
I did add this to the beginning so button 2 does not show on page load. https://braphox.wixsite.com/website/enterrp

$w.onReady( function () {

$w(“#button2”).hide();
});

@mhammouz
thank you very much , it was very helpful… :slight_smile: