How would I lock vertex transforms to a certain axis? I'm sculpting squares of terrain, and I was wondering if it were possible to lock vertex groups to, let's say, the x axis. I still want to modify the height of the verts, although I want to maintain the square profile of the borders.

Is this possible?
For sculpting, you can use lock to certain axes in the Symmetry / Lock rollout in the brush settings.