Implement ActiveForm and ActiveField

See issue #3029.