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

Discussion

Discussion

Forms - Disable Javascript on Show Submitted Form

posted on January 7, 2015 Show version history

I have javascript on my form for user interactivity and I want to disable it for the form displayed on the Thank You page when you choose Show Submitted Form.

 

I also have a download button and expected that if the app could find the download button then I could tell it not to run my code but for some reason it does not work. Here is the code I am using to detect the download button, I have also tried other methods of detecting the button without any success.

 

    if ($('#sub-download-btn').length > 0) {
       }else{

//My Code Here

}

Also tried looking at the page URL to see if it contained the word submit.

 

    if (window.location.href.indexOf("Submit") > -1) {
       }else{
//My code here
  }

 

0 0
replied on January 8, 2015 Show version history

Checking page URL containing "Submit" won't work since the form is inside iframe. You can check the correct URL by developer tools on iframe element.

I tested with (window.location.href.indexOf("showformsubmission") > -1) and it worked.

Or you can use (window.submissionPageCheck) as Dustin replied in https://answers.laserfiche.com/questions/65597/Submitter-Print-Form-Option-Not-Expanding-Collapsable-Sections

0 0
replied on January 12, 2015

Perfect, didn't realize someone had already posted. Thank you its working now!

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

Sign in to reply to this post.