Well there's couple of ways to do this.
First thing to know is that are you using one form with different visibilities of the fields?
Or do you have two separate forms?
If you have two separate forms you can put fields 1,3 and 5 to the first form and then put 2, 4 and 6 to the second. Then in the forms Visibility field you want to set a context variable or normal boolean type variable (I get on to this later).
If you got one form then you need to separately set to every field their own Visibility. Use context variables or normal boolean variable to do this. Basicly you want 1, 3 and 5 set like ShowField and on 2, 4 and 6 you need to reverse it to !ShowField.
Now we need a way to switch the visibility. The best way is to use button or Yes-No-switch or something that is easy to convert in to bool. Then you can either use normal variable or context variable.
Let's say we have a button called SwitchFields_Button. On OnSelect field we need to add this:
UpdateContext({ShowFields:!ShowFields})
//OR
If(Not(varShowFields);Set(varShowFields;true);Ser(varShowFields;false)
//We use If-statement to check if the variable is true of false and depending on that we change the value to true or false. E.g. If varShowFields is true -> set it to false. This way we are not stuck with button that can only set true value. Otherwise we need two separate buttons, one that set true and other one falseNow on to the forms or form items Visibility field we need to set this:
ShowFields
//If you're setting this to fields Visibility, you need to set !ShowFields to the 2,4 and 6
//OR
varShowFields
//And if you set this to fields Visibility, remember to set !varShowFields to 2,4 and 6
I hope this cleared up something. There may be better ways to do this but this is how I've done things in the past.