fixed javascript for preset selection in edit form