Introduce the SubForm class to handle common code for nested forms.