For your first question, yes, that's easy enough. You can use the function GetUser, then check the username.
var the_user = GetUser($layer)['username']
return the_user == 'carlsonj9'
Having an expression like this in the conditional visibility setting of the form group will get it to behave as you describe.
For the second, that seems less doable, but maybe not impossible. How does this "switch" work? Is it something that operates per-feature? Do you have a field to store the value of the switch state?
- Josh Carlson
Kendall County GIS