public RegistrationTemplateForm GetForm( bool expandInvalid )
{
EnsureChildControls();
RegistrationTemplateForm result = new RegistrationTemplateForm();
result.Id = _hfFormId.ValueAsInt();
result.Guid = new Guid( _hfFormGuid.Value );
result.Name = _tbFormName.Text;
if (expandInvalid && !Expanded && !result.IsValid)
{
Expanded = true;
}
return result;
}