Hi @rowatt
Your code above is perfectly fine and is a smart way to remove a specific field for a given block of logic.
Instead of doing this field by field, you can also create your own location rules. Location rules are used on a field group to toggle it’s display. Jump over to the docs to see a tutorial on creating your own location rule (one for specific capability)
Thanks
E