I have a few fields that are required. However if a option is chosen I
would like to switch all these fields to not-required.

I'm having issues making since of "is-required". If I set it to "True"
or "False" I get an error that an expected string was expected for
isRequired.
What's the proper way to used this form method?

setRequired(fieldname, is-required)

form.setRequired("fieldname", is-required)
Sets the field to required if is-required is True or optional otherwise.
A field that is required blocks the form submission if it is empty.

thanks