Unbreak javascript for forms not including category/categories

Change-Id: Ice9e44847e6730ba0ae747e555c8ef30d13046dd