HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

jQuery Append function - Custom Fields



Request Form page (Portal):
I would like to append an HTML next to Custom Field input.
Such as:

Where should I place my append function in the templates? If there are another way to work it out, please share it.
I tried in the header as well as the request.tpl file, but it doesn’t work.

Apprecaite it


In request.tpl.php should work. Could you share the code you are using?


At the top of the template: PORTAL(
< script >
function isValidEmail() {
var email = document.getElementById(“EmailField”).value;
var submissionbutton = document.getElementById(“submitbutton”)
email = email.toLowerCase();
var AcceptedDomains = [“”, “”, “”];
var domfound = false;
// Get email parts. emailName is not used, but is there in case of… the future
var emailParts = email.split("@"),
emailName = emailParts[0],
emailDomain = emailParts[1];

for (i = 0; i < AcceptedDomains.length; i++){
if(emailDomain == AcceptedDomains[i]) {
submissionbutton.disabled = false;
return true;
if (domfound == false) {
alert(“The email address you entered is invalid. Please enter a valid:”)
submissionbutton.disabled = true;
return false;
/* I WANT TO SHOW - ID Called is for a Custom Field created */
$( “#Custom87_wrapper” ).append( “Hello” );

function validate(){
var inp = document.getElementById(‘doc1’);
if(inp.files.length === 0){
alert(“Approval Application Form Attachment is Required!.”);
return false;

</ script >


Ok so here it looks like you are trying to use the jquery append function. You need to instantiate jquery in no conflict mode in order have access to those functions. You’ll need to include jquery from a cdn. For example Google:
<script src=""></script>

Then take a look at this thread for how to instantiate jquery in no conflict mode. How to use jQuery on the client side?


G’day Matt,

Thank you! :slight_smile: I added the magic of:
var $jq = jQuery.noConflict();
//alert(“jQuery is working.”);
$jq( “#Custom87_wrapper .datalabel” ).html( “Banner : URL” );
It worked!.

Thank you,

Kind regards,
Rakan Bkhreba


Great! Glad that got it working for you.