How would you in code, identify what block the user is on?
And if I wanted to switch various fields on/off, where would this code best be placed?
With blocks you mean pages/tabs?
For on/off you have macros to do it, check web help.
sc_field_disabled (“Field_Name = True/False”, “Parameter”)
This macro its used to block a field to get any data that would be typed on it.
sc_field_display ({My_Field}, on/off)
This macro dynamically display or not a specific field.
sc_field_readonly ({Field}, on/off)
The only way to know in what block a user is, is to create onfocus ajax events on the fields in that block and set some kind of variable with the block the variable is in. Why should you want that.