Change text of collapser depending on state; autofocus appropriate field and set up initial collapser state depending on command type chosen