Modified for edit and search form