Locking an axis for a curve
You could try setting the curve shape to 2D in Curve > Shape until you want to adjust it in Z axis:



Note that you will still be able to rotate the curve in Object Mode, so you can use this to lock the curve in any direction.

Another option is to fix the curve afterwards:


Select all the control points (A):


Scale to 0 on the axis you want to lock. E.g. SZ0
This will scale everything to be on a plane with the Pivot point, so you can easily control this by using the 3D cursor: