My problem is I have to double click on an option to get it to fire and display, and I can not see the reason why. The first time you click, the selector box fills with your selection, BUT, the options do not fill. I click the second time on the name of the option and I get a result. How do I arrange things so I do not click twice?
It seems like the issue might be related to the JavaScript event that is being used. The 'click' event on a select element is not the standard way to detect when an option has been selected. Instead, you should use the 'change' event, which is fired when the value of the select element changes. This will ensure that the event is triggered as soon as a user selects an option, without the need for a double-click.
Here's how you can modify the JavaScript code to use the 'change' event:
$('#template_name').on('change', function () {
// Your code here that should run when an option is selected
});
This change should resolve the issue of needing to double-click to get the option to fire and display. The 'change' event will trigger as soon as a different option is selected, and your JavaScript code will execute accordingly.