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

Question

Question

Save as Draft - set a default email & password

asked on December 26, 2017 Show version history

Is it possible (via JS or any means) to automatically set the email address and password in the popup when a form is saved as a draft?   Ideally as read only.

Why would we want to do this?  ( the inevitable question! )
We have a very lengthy form (24+ pages on paper) that is to be filled out by inmates within our prison system (on a secured tablet).   Being incarcerated, they do not have access to email or other places on the network.   Since it is required to supply an email address to save a form as a draft, we would like to hard code this to be sent to a group mailbox accessible by staff. 
  The inmates themselves would retrieve the link to their draft by filling out a secondary form that uniquely identifies them, finds and constructs the link to their draft via workflow and queries from the Forms database ( this we have been able to do ).  This allows the inmate to pull the draft up themselves and not have staff sort through emails of submitted drafts to find the correct one.

Thanks

1 0

Answer

SELECTED ANSWER
replied on December 26, 2017

Hi Andrew,

You can use JavaScript to fill the fields that appear when a submitter chooses to save a draft, as well as make the fields read-only. To achieve this, you can adapt the snippet below to display the appropriate email address for your process.

$(document).ready(function () {

  //set email text and make readonly
  $('#tfa_emailadd').val('Your Email Here');
  $('#tfa_emailadd').attr("readonly","true");
  
  //set draft name text and make readonly
  $('#tfa_draftname').val('Draft Name Here');
  $('#tfa_draftname').attr("readonly","true");
  
});
2 0
replied on December 27, 2017 Show version history

Thanks again Kathleen

I would mark your reply as the answer to my question but I don't have that option since my original post was edited by @████████.  Hopefully they are able to mark it as the answer. 

0 0
replied on December 27, 2017

Doesn't seem possible (whoops). Sorry for tagging it with topics---sometimes the relevant people miss posts because they are not tagged appropriately.

0 0
replied on December 27, 2017

It's not the tagging or the edits. It's because the thread was a discussion not a question. I switched it to a question, so you can now mark it as answered.

0 0
replied on December 27, 2017

Thanks Miruna,   I must have been half asleep when I posted.

0 0

Replies

replied on December 27, 2017

Thanks so much Kathleen, that is what I was looking for.

Since the people filling out the form will not be licensed participants they will be asked for a password, and confirmation password, not for a draft name.    Do you know the variables to auto fill the password in, specifically the confirmation?

I used $('#tfa_password').val('password here') and that works for the password but I don't know what the variable is for the confirmation password.  None of my guesses have worked thus far.

Thanks,

Andrew

0 0
replied on December 27, 2017

Found it:   $('#tfa_confirm_password').val('123');

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.