private void AddPasswordConfirmField(string dataField, string dataMember, bool required) { var formItem = new DnnFormTextBoxItem { ID = dataField, DataField = dataField, DataMember = dataMember, Visible = true, Required = required, TextMode = TextBoxMode.Password, TextBoxCssClass = ConfirmPasswordTextBoxCssClass, }; userForm.Items.Add(formItem); }
private void AddField(string dataField, string dataMember, bool required, string regexValidator, TextBoxMode textMode) { var formItem = new DnnFormTextBoxItem { ID = dataField, DataField = dataField, DataMember = dataMember, Visible = true, Required = required, TextMode = textMode }; if (!String.IsNullOrEmpty(regexValidator)) { formItem.ValidationExpression = regexValidator; } userForm.Items.Add(formItem); }
private void AddPasswordStrengthField(string dataField, string dataMember, bool required) { DnnFormItemBase formItem; if (Host.EnableStrengthMeter) { formItem = new DnnFormPasswordItem { TextBoxCssClass = PasswordStrengthTextBoxCssClass, ContainerCssClass = "password-strength-container" }; } else { formItem = new DnnFormTextBoxItem { TextMode = TextBoxMode.Password, TextBoxCssClass = PasswordStrengthTextBoxCssClass, }; } formItem.ID = dataField; formItem.DataField = dataField; formItem.DataMember = dataMember; formItem.Visible = true; formItem.Required = required; userForm.Items.Add(formItem); }