treesearch: enable/disable appropriate form elements