fixes switch inside custom form when using mixin, closes #2370