Sorry for the late response. Just in case you haven't gotten it sorted out yet, this one is kind of a common issue. For re-usability purposes, i typically write it into a function. Here's a quick example. adding an 'id' parameter that automatically sets an option based on a passed id is trivial, but a good idea. I'll leave that as an exercise for you.