fixed javascript in add form