Checking if attribute exists before setting values and making disable and enable as per view and edit form.