Add criteria field in read mode and add client-side JavaScript to edit mode