Recent searches


No recent searches

Guide - Disclaimer Box for Specific Form



Posted Dec 09, 2024

Hi there,

 

We are looking for a way to add in a ‘disclaimer’ box that only appears on a specific form. I found this article which gives a code, but it isn't for a specific form. My coding knowledge is limited, so I was really hoping someone on here might know the answer?

 

This is the current code I have on the new_request_page.hbs page:

 

  <script type="text/javascript">
(function() {

"use strict";

var getFormId = function() {
var formSelectField = document.getElementById('request_issue_type_select');
if (formSelectField && formSelectField.value !== '-') {
return formSelectField.value;
}

return null;
};

var formId = getFormId();

if (formId = 31682700836123) {
var disclaimer = document.getElementById('disclaimer-' + formId);
if (disclaimer) {
var itemToInsertBefore = document.querySelector('form footer input[type="submit"]');
itemToInsertBefore.parentNode.insertBefore(disclaimer, itemToInsertBefore);
disclaimer.style.display = 'block';
}
}
})();
</script>
  <div id="disclaimer-31682700836123" class="note" style="display: block;">
    <h1>General Ordering Notes</h1>
<body>Once the quote has been submitted, our procurement team will produce a quote. The quote will be sent to the RM for approval, as they are the only team members who can approve quotes per RPM standard processes. 

All order requests will require a VALID PO or WTN in order to process the order. We will not be able to process the quote if anything but a valid PO or WTN is provided. Quotes signed with an email, an "approved", a date, or anything else that does not represent a PO will not be approved. <br><br>
  <b>PLEASE READ:</b>
  Docks and peripherals are only certified to be compatible with the computers listed here. If you need a peripheral for an existing machine, please note that here and include your computer brand, and serial number. We may need to contact you directly to clarify your request and get more compatibility information before ordering. If placing an order for Microsoft Office licenses, they are purchased per PC. Please also note that Integris does not own that license key/account, this is managed on the property level. 
   
    </body>
</div>

 

It looks like this:

 

However, this shows up for ALL forms, not the specific one we'd like this for. 

 

I've tried adding the code:

 

 if (window.location.href.indexOf('ticket_form_id='31682700836123') > -1) {
 $('.form-disclaimer').show();
} 

 

but this doesn't work on the new_request_page.hbs code. 

Thank you in advance!

Ifra Saqlain  tagged as you're a wizard with this kind of coding. 


0

1

1 comment

Bumping this thread to see if anyone can help! :)

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post