More DRY for the form element directive