Keep users from submitting already submitted form

Hi Erik,
Just a quick follow-up to know if all went well with the setup I showed you

Hi Matthieu,

I need your help with a problem Iā€™ve been having on my website. I have a page called ā€œAvailable projectsā€ where hundreds of users can view and apply to new projects we post. The projects are displayed in a list with vertical cards and tags. Each project has an ā€œApply/Join Projectā€ button that, when clicked, opens a modal with some text and an application form. The form has two hidden fields, one to capture the loggen in userā€™s ID and the other to capture the project ID that they applied to.

My issue is that once a user has applied to a project, they should not be able to apply again. I want the ā€œApply/Join Projectā€ button on the list with vertical cards and tags to change to ā€œAppliedā€ and either not open the modal when clicked, or allow the user to open the modal but not submit the form again. It should of course only be for that specific user, so other users can still click apply and submit the form for example.

I hope I explained it well. Any thoughts?

Hi @erikm3103
I faced a tutorial that shows how to create Action Buttons for similar cases. Please check out this tutorial I suppose it might help.

There can be a custom code that could be applied to it, I think. Totally forgot your post, let me check this tomorrow (not sure action buttons will be able do what you want to do)

1 Like

We are all into Action Buttons to be fair this is implemented, but we are delaying the release a bit :slight_smile:

Thanks to the Softr team for adding more action button functionality as well as the ā€œA logged-in user can only submit onceā€ functionality.

There are several different possible use cases here, but when you turn that functionality on, it sets the button to ā€œdisabled.ā€ That allows you to either style it with CSS to look disabled (in the pageā€™s custom code):

#blockname button[disabled]
{
background-color:#cccccc !important;
}

Or you can simply make it disappear:

#blockname button[disabled]
{
display: none;
}

Just add style tags and change ā€œblocknameā€ to whatever the name of the block is in the studio.