I want to hide a form button if a member has already submitted said form

Hi, in my members section I have a button that links to a form for them to register for an event. I need that button to disappear once they submit the form and no longer show when the page loads.

I’m assuming I would need to collect the data from the form into a database, query the database when the page loads to determine if a specific field is empty or filled, and then add a .hide to the element’s value if the field is filled.

I’m not a programmer so even if what I wrote above is remotely correct, I have no idea how to execute. Any help would be appreciated.

I found the solution.

  1. Turn on Developer Mode.

  2. Select your Submit button to see what its element name is. In my case, it was button3.

  3. Select the Form itself (click in the empty space beside your form)

  4. In the code view, you’ll see the form submit code (your code will be slightly different as your form name will be different as well):
    export function getSubscribers2_wixFormSubmitted ( ) {

  5. After the { press Enter/Return to create a new line and add: $w(‘#button3’).hide(); making sure to change the ‘#button3’ to whatever your submit button name is.

  6. Publish the changes and test it out. After someone submits the form, the button will disappear and your submit message will appear. Refreshing the page will reset the form and the Submit button will reappear.

A Screenshot Of My Code: