HelpSpot Help Desk Software | HelpSpot Blog | HelpSpot Support

Drill Down Menu With text entering


#1

Is it possible to have a drill down menu such as:

  • Operating Company (Check ONLY One) FS FT FVS GH
  • Sub Account # (GH Only)

And then have this available option on the portal?


#2

Ok so I have found some code and it works for the first part of my question. I get the drop down for the four Companies. I am trying to have IF statement for if the company is GH then present a text box that is required else just proceed. It works with the IF statement being blank not sure where I am going wrong.

<?php $locationsearch = $GLOBALS['DB']->Execute('SELECT DISTINCT Custom82 FROM HS_Request WHERE (xCategory = 22) ORDER BY Custom82'); echo ''; if(is_object($locationsearch) && $locationsearch->RecordCount() > 0){ echo ''; //WRITE OUT A BLANK OPTION while($selectrow = $locationsearch->FetchRow()){ if (($selectrow['Custom82'] == 'GH')) { /*$field['isRequired'] ? ' required' : ''; $locationname ='Custom'.$field['Custom83']; $locationvalue = $selectrow['Custom83']; $field['isAlwaysVisible'] ? '' : 'display:none;'; */ } else { $locationname = $selectrow['Custom82']; $locationvalue = $selectrow['Custom82']; echo ''.$locationname.''; } } echo '
'; } ?>

#3

Well, I don’t think you’ll be able to put this logic entirely in PHP because they’re making the selection in box 1 and it’s never going back to the server after that until they submit. You’d need javascript to show/hide the second box.

However, I think it would be easier to use the built in drill down custom field type and only have lower tier options for the GH option and not the others unless I’m not understanding.