display_template_edit and display_custom_form functions cleaned