Added edit form handling