November Happy Hour will be moved to Thursday December 5th.

Validating of XForms

Vote:
 
Hello. I've created a xform, made some required values (including an email field), and when i post the form with a badly entered email i only get a message telling me the email is wrongly entered. Why doesn't a * appear after the e-mail textbox? Is there a way of making it appear? It works if the field is empty.
#12868
Dec 11, 2006 16:02
Vote:
 
this made it work: private void myForm_BeforeReadingPostedData(object sender, SaveFormDataEventArgs e) { ArrayList _controls = myForm.ExtractXFormControls(); foreach (XFormControlBase _control in _controls) { if (_control.Reference != null && _control.Reference.ToLower() == "email") { bool _valid = _control.IsValidInput(); _control.DisplayRequiredMessage = !_valid; } } }
#15017
Dec 12, 2006 11:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.