Add form-related attributes to variables, and variables group relationship