Body: <p>Is it possible to either prevent a second submission of a webform with the same cid (the users aren't logged in but are using links with cid and checksum) or to warn the user that they have already submitted the webform?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-11T19:24:10.270Z
Comments.Text: if you have the contact ID or checksum fields on the form (hidden) as a component then webform should allow you to set that component as unique - that may require webform_validation if d7
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-11T19:47:30.123Z
Comments.Text: That does work, but it isn't great from a user perspective, as it doesn't say anything until after you try to submit the form and the error message is pretty cryptic. Ideally, there would be a way to warn users as soon as they load the page.
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-12T20:26:33.283Z
Comments.Text: I expect some JS might be the solution
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-12T21:19:19.673Z
Comments.Text: I might look at adding something to Webform CiviCRM, as we can't be the only ones that run into this and it shouldn't be too complex.
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-16T09:29:23.797Z
Comments.Text: There is a setting for 'Per user submission limit' and if set to '1 - ever' does usually show 'You have already submitted this form.' when loaded - or at least that what it does if logged in so might do the same if validated via checksum?
Comments.UserDisplayName: RebeccaTregenna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-05-16T14:12:50.933Z
Comments.Text: You're right, that does sort of work. I assumed it only worked for logged-in users. But unfortunately, what I get is that it simply doesn't load anything beyond the Not you? message at all, so the user doesn't know what's going on. If you reload, then it shows "You may not submit another entry at this time.". So maybe something to start with there.
Comments.UserDisplayName: Lars SG
Tags: <webform-civicrm>
Title: Webform: Prevent submission or warn if contact has already submitted the webform
ThreadText: # Webform: Prevent submission or warn if contact has already submitted the webform
  
  (Asked by: username_0 on 2023-05-11)
  
  Is it possible to either prevent a second submission of a webform with the same cid (the users aren't logged in but are using links with cid and checksum) or to warn the user that they have already submitted the webform?
  
  **Tags:** webform-civicrm
  
  > **Comments:**
  > **username_1**: if you have the contact ID or checksum fields on the form (hidden) as a component then webform should allow you to set that component as unique - that may require webform_validation if d7  
  > **username_0**: That does work, but it isn't great from a user perspective, as it doesn't say anything until after you try to submit the form and the error message is pretty cryptic. Ideally, there would be a way to warn users as soon as they load the page.  
  > **username_1**: I expect some JS might be the solution  
  > **username_0**: I might look at adding something to Webform CiviCRM, as we can't be the only ones that run into this and it shouldn't be too complex.  
  > **username_2**: There is a setting for 'Per user submission limit' and if set to '1 - ever' does usually show 'You have already submitted this form.' when loaded - or at least that what it does if logged in so might do the same if validated via checksum?  
  > **username_0**: You're right, that does sort of work. I assumed it only worked for logged-in users. But unfortunately, what I get is that it simply doesn't load anything beyond the Not you? message at all, so the user doesn't know what's going on. If you reload, then it shows "You may not submit another entry at this time.". So maybe something to start with there.  
  
  ---
  
  ## 0 answers
  
  