示例#1
0
        /// <summary>
        /// Handles the BeforeLoadingForm event of the XFormControl.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EPiServer.XForms.WebControls.LoadFormEventArgs"/> instance containing the event data.</param>
        public void XForm_BeforeLoadingForm(object sender, LoadFormEventArgs e)
        {
            XFormControl formControl = (XFormControl)sender;

            //We set the validation group of the form to match our global validation group in the master page.
            formControl.ValidationGroup = "XForm";
        }
示例#2
0
        /// <summary>
        /// Handles the BeforeLoadingForm event of the XFormControl.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EPiServer.XForms.WebControls.LoadFormEventArgs"/> instance containing the event data.</param>
        public void XForm_BeforeLoadingForm(object sender, LoadFormEventArgs e)
        {
            XFormControl formControl = (XFormControl)sender;

            //We set the validation group of the form to match our global validation group in the master page.
            formControl.ValidationGroup = "XForm";
        }
 /// <summary>
 /// Handles the BeforeLoadingForm event of the XFormControl.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EPiServer.XForms.WebControls.LoadFormEventArgs"/> instance containing the event data.</param>
 public void XForm_BeforeLoadingForm(object sender, LoadFormEventArgs e)
 {
     XFormControl formControl = (XFormControl)sender;
     if (String.IsNullOrEmpty(formControl.ValidationGroup))
     {
         //We set the validation group of the form to match our global validation group in the master page if no group has been defined.
         formControl.ValidationGroup = "XForm_" + Guid.NewGuid().ToString();
     }
 }
示例#4
0
        /// <summary>
        /// Handles the BeforeLoadingForm event of the XFormControl.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EPiServer.XForms.WebControls.LoadFormEventArgs"/> instance containing the event data.</param>
        public void XForm_BeforeLoadingForm(object sender, LoadFormEventArgs e)
        {
            XFormControl formControl = (XFormControl)sender;

            if (String.IsNullOrEmpty(formControl.ValidationGroup))
            {
                //We set the validation group of the form to match our global validation group in the master page if no group has been defined.
                formControl.ValidationGroup = "XForm_" + Guid.NewGuid().ToString();
            }
        }