Silver Challenge: Custom Validation for Decaf

What is the recommended way to get the value of the element that is not the event.target?

HerbertP,

Not sure if this is the recommended way but I was able to get this to work. I am using

$(’[data-coffee-order=“coffeeOrder”]’).val();

to get the value of the other input.

Yeah, equally not sure what the recommended approach is but this worked for me when the target was coffeeOrder:

event.target.form.strength.value;

and vice versa when the target was strengthLevel:

event.target.form.coffee.value;