Hello,
While onLoad processing is running you want to hide the section? For new InfoPath form opens you want to hide the section? When you want the hide section exactly?
For hiding the section we have to add the conditional formatting of the section depending on your condition. Like as below
field1 is equal to "true" -> Hide this control.
Note: Make sure that your condition should be correct. We can't do show/hide the section in script or any code.