Hello,
Yes, you are right. I am sorry, I did not realize it.
In that case, it would be better to use an
OnAfterValidate event of the
BizForm control to set
Text property of the error label according to your needs.
You can set the
Text property to some value directly or you can create and use a new resource string:
<data name="basicform.emptyfile" xml:space="preserve">
<value>Please upload a file!</value>
</data>Example of the
OnAfterValidate event:
void viewBiz_OnAfterValidate()
{
((CMS.ExtendedControls.LocalizedLabel)viewBiz.BasicForm.FieldErrorLabels["FileField"]).Text = "Please upload a file!";
// OR
((CMS.ExtendedControls.LocalizedLabel)viewBiz.BasicForm.FieldErrorLabels["FileField"]).Text = ResHelper.GetString("basicform.emptyfile");
}
For more information about BizForm handler events, I would like to point to the following article:
Bizforms customization possibilitiesBest regards,
Michal Legen