You can do this via the python interface. Start the Python Console from the plugin menu.
As an example, this code will set all 10 fields of the first layer to "Hidden":
# get map canvas object
mc = iface.mapCanvas()
# get the first layer (layer 0)
l = mc.layers()[0]
# get the edit form configuration
f = l.editFormConfig()
# loop over 0 to 9, and set fields to "Hidden"
[f.setWidgetType(i, "Hidden") for i in range(10)]
# outputs: [None, None, None, None, None, None, None, None, None, None]
It should be possible to get the number of fields from the layer info somehow so you can replace the 10 with something that works with however many fields you have...
If you want to set some edit forms to "Hidden", then get the f
as above and just do f.setWidgetType(3,"Hidden")
to set the fourth (python starts at 0) field to Hidden. Repeat for all the fields you want.