fixes #4639 - array in lookup_value incorrectly displayed in form
fixes #4672 - added template_name template variable