You are viewing limited content. For full access, please sign in.

Question

Question

Anonymous Forms submission - Expire the link after 1st submission

asked on October 14, 2016 Show version history

I have a business process which is triggered by a workflow. The workflow sets business process variable and the link to that business process form is sent via email. The email recipient has to upload documents and submit which is reviewed by an approver (next stage within the form - a user task).

If the user submits the form again using the link within his email , how can i notify him that, he has already submitted the documents.

Or restrict him from submitting (is there a way in which we can control this)

 

Thank you

0 0

Answer

SELECTED ANSWER
replied on October 18, 2016

Here is an example I used on a form to do exactly what I referred to:

//Disables the Submit button if the Completed field value equals True
  var $submit = $('.Submit');
    $submit.hide();
    $("#Field146").on("change", function() {
        if ($(this).val() != "True"){
            $submit.show();
        } else {
            $submit.hide();
        }
    });

Field146 is the field I was populating from the database lookup. It was populating it with a value of True.

0 0

Replies

replied on October 14, 2016

Not built into Forms. If you are passing variables through the URL, there is a way to do it if you store data in a database. If once the form is submitted, you can kick off a workflow that then inserts a couple of pieces of data that would help identify that submission into a database table. Include an extra field in the table with a value of something like yes. When the URL is then clicked on, it should populate the corresponding fields from the URL and then set it up so that the values you have in your database perform a lookup for that record in the database. If found, add a hidden field on your form that populates the yes value. If the field has a value of yes, disable the submit button. Let me know if that made sense.

1 0
replied on October 15, 2016

Thank you for the solution. It definitely make sense.I did try something similar , was not successful. 

Need to try what you have suggested.Will update the details once i am through.

0 0
replied on October 17, 2016

Hi Blake

I tried as per your suggestion but  the issue is with the script,i think the script runs before the field is populated using the lookup and hence the condition is not successful. The script workd if i put the default value in the form.

  
$(document).ready(function(){
   
 var text_value = $('#q23 input').val(); 
  
 if(text_value=='Yes')
 
  {
    
     $('.Submit').hide();
   alert("hide"); 
 }
  
  else {
    
 $('.Submit').show();
    
   alert("Show");
  
    }
  
});

0 0
SELECTED ANSWER
replied on October 18, 2016

Here is an example I used on a form to do exactly what I referred to:

//Disables the Submit button if the Completed field value equals True
  var $submit = $('.Submit');
    $submit.hide();
    $("#Field146").on("change", function() {
        if ($(this).val() != "True"){
            $submit.show();
        } else {
            $submit.hide();
        }
    });

Field146 is the field I was populating from the database lookup. It was populating it with a value of True.

0 0
replied on October 18, 2016

Thank you Blake! I had managed to crack it , used the following:

$(document).ready(function() {
 
  $('#q23 input').change(function() {

    if ($(this).val() == "Yes") {
      $('.Submit').hide();
   alert("Hide");
    }
    else if ($(this).val() !== "Yes") {
       $('.Submit').show();
  alert("Show");
    }           
  });
});
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.