Properly set value in form fields