refactor js code to profile_form_load