How can I simply (without code/special permissions) keep signed up users from submitting a form that they have already submitted?
I currently have a button on a list details block that links to a form. The form has two hidden fields, one that passes the record id of an item and another that passes the user id (email). A simple solution doesn’t seem to be posted in the community, so I appreciate any help, ideas, or info. Thanks!
Hi Ben, What do you want to see exactly? When the form is submitted, then the button disappears?
If so, I usually use airtable formula (that’s the only way) with an IF function.
If this is your case, tell me, and I will write the formula here
Hi Matthieu. Sure, the button disappearing on the list details block after the form is submitted would be a good outcome. I’m interested to see how that would work, given the workflow I described.
Quick question: where is the form? in an other page? or in the same page as the list details block with the button (sorry if it appears stupid, devil is in the details, even if I’m pretty sure it’s in an other page = you click on the button on page 1 => it leads you to the form on page 2, does it?)
Yes. The button on a list details block points to another page where the form is. If that is not possible without code or special permissions, a disappearing form below the list details block on the same page could work as well.
in Airtable, within the table where the data of the list details page is, you’re going to add a formula field
This formula will be like the screenshot (please adapt it to your use case). Note that you absolutely need to get the recordId of the next page within that formula = the recordId needs to be in the table too (even inside a lookup field, no problem).
Go back to Softr studio, go to the button of the list details page and choose “open external url”. Choose the formula field you just created.
It should work, when the form is submitted = the recordId will be created in Airtable = so it won’t be empty anymore. The formula will make the button disappear as Softr makes it disappear when there is no data to display.
Your use case might be a little more complicated, specifically inside the Airtable base. Don’t worry, I can still help (will be for tomorrow), as it’s just a little work to put all the right data in the same table. So, if you have any problem, you can just send some pictures here or in private message (Just precising that it will be 100% free, even if I mentioned “little work” or private message )
Note that all what is black in the screenshot should be violet (sign that it is dynamic data) + the & and what is after (the recordId dynamically pulled in the formula is attached, even if it doesn’t look attached)
Note 2: I forgot a ) at the very end of the formula showed in the screenshot
Note 3: this recordId is the recordId of the page where will be the form
Note 4: you can also use this formula :
IF ({Field A} = BLANK() , ’ ’ , ‘yourdomain.com’&{recordId})
Thanks for the advice Matthieu! Step 2 was tough to follow, but I think the idea works.
{REVIEWS} links to another table for the form data. {Reservation Review Button} is what the list details button points to and the {Reservation Record ID} is the record id of the list details item on this table.
{Reservation Review Button} formula above simply provides a link to the form if the {REVIEWS} field is empty (meaning there is no form already submitted).
Let me know if you foresee any problems with this as it appears to work in preview mode.
I have this block, where the usecase is that the user is supposed to be able to apply for a project. If they already have applied I would like them to see a message such as “Applied” or just not being able to open modal.
Any thoughts on how I can do this? I tried playing around with this script, but now I’m quite lost and might need some assistance:)
<script>
// Hide block with available projects if email is already in Project Participants field
document.addEventListener("DOMContentLoaded", function() {
var waitForData = setInterval(function () {
if (typeof $ != 'undefined') {
if (document.querySelectorAll('div[data-mappedto="Project Participants"][data-value*="email@domain.com"]').length > 0) {
var projectBlock = document.getElementById('available-projects');
projectBlock.style.display = 'none';
clearInterval(waitForData);
}
}
}, 100);
});
</script>
Hi!
You shouldn’t have to use a custom code if you want to hide the button, a formula field in AIrtable should do the trick. It would show the button if the user didn’t apply to the project and hide the button if the user already applied to the project, just like explained above in this thread.
Though I can make it for you if any problem
Thanks for your kind message.
Here is an example of two formula fields that hide/show a button of a dynamic block.
This is not your use case but it will help you understand.
What is performed is that when a content resource is set as “premium” and a user is not a paid user, the button “go premium” appears". When the user is a paid member or when the content resource is not premium, the button disappears.
I do the same to force some users to sign in to view some resources (which are free… but I want them to sign in => helps the sales funnel, this second formula uses IF and OR to get all the needed variables)
I use this method a lot. Then you have to link the formula field to the button with the option "link to external url… which is a dynamic option within dynamic blocks => can be linked to any airtable field displaying a url, aka a url field or a formula field)