HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Theme.js example


A customer submitted this javascript snippet that pops up a message if you haven’t filled in the time tracker and the status is active. To use this you’d put it in a theme javascript file (you probably have to build the file) like:


//hs_alert(“Test message”);
$jq(’#sub_updatenclose’).click(function() {
if($jq(‘select#xStatus’).val() == “1”){ // only show the alert if the status is Open
hs_alert(‘Total time logged on this ticket:

’ + $jq(’#time-tracker-total’).text() + ‘

Make sure you enter your time into Time Tracker!’);
} );