Custom Kit Form Validation
Way too many calls to $

This pops up way too much in your code (or something like this):


$("#kit_model")



Normally, document.getElementById itself can be slow. However, this jQuery function is even slower because, not only does it have to traverse the DOM in search for a single element, but it also has to wrap it sugar another object for access to more methods/properties.

It'd be better to reduce your calls to this function. Instead, store the return from a single call in a variable and use that:

var kitModel = $("#kit_model");


Do this for the other elements that you grab more than once, too.

If you are in control of the highlight and restore functions, change them so they can accept the element itself through parameters. This will make your function more flexible, and also allows you to just continue to use this variable you have.



Tables for layout

If I understand correctly, you are using tables in your HTML code to correctly position your DOM elements. This is bad/old practice. You should instead be using CSS rules to position elements.

Tables are for data that belongs in tables.



Initialize attributes in HTML

Here, you are initializing your submit button to be disabled in your JavaScript code:


$('#kit_submit').prop("disabled", true);



Instead, you should simply just slap a disabled onto the element itself.



Unnecessary condition

Will this condition ever pass?


$("#custom_kit_form").submit(function() {
    if ($("#kit_model").val() == 0)



The submit button can't be clicked in the first place if the value of the kit model is 0 because the change listener will disable the button.

You can safely remove this part of the submit listener.