Hi,
I have an alternative form (site signup).
When webpart loads I would like to pre-populate some of the fields(textboxes).
example:
if I gathered persons FirstName that field should already show his FirstName.
How can I do this?
couldn't find any ".Set" function for doing this.
this is the setup code:
any examples on how to do this?
protected void SetupControl()
{
if (this.StopProcessing)
{
// Do nothing
}
else
{
// WAI validation
lblCaptcha.AssociatedControlClientID = captchaElem.InputClientID;
// Get alternative form info
AlternativeFormInfo afi = AlternativeFormInfoProvider.GetAlternativeFormInfo(AlternativeForm);
if (afi != null)
{
formUser.AlternativeFormFullName = this.AlternativeForm;
formUser.Info = new UserInfo();
formUser.ClearAfterSave = false;
formUser.Visible = true;
formUser.ValidationErrorMessage = this.RegistrationErrorMessage;
formUser.IsLiveSite = true;
// Reload form if not in PortalEngine environment and if post back
if ((this.StandAlone) && (RequestHelper.IsPostBack()))
{
formUser.ReloadData();
}
captchaElem.Visible = this.DisplayCaptcha;
lblCaptcha.Visible = this.DisplayCaptcha;
plcCaptcha.Visible = this.DisplayCaptcha;
btnRegister.Text = this.ButtonText;
btnRegister.Click += new EventHandler(btnRegister_Click);
formUser.OnBeforeSave += new DataForm.OnBeforeSaveEventHandler(formUser_OnBeforeSave);
lblInfo.CssClass = "EditingFormInfoLabel";
lblError.CssClass = "EditingFormErrorLabel";
}
else
{
lblError.Text = String.Format(ResHelper.GetString("altform.formdoesntexists"), AlternativeForm);
lblError.Visible = true;
pnlRegForm.Visible = false;
}
}
}