improve form to allow validation at theme level