This is a migrated thread and some comments may be shown as answers.

Wizard html5 Validation not working

3 Answers 110 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Dev asked on 03 Jul 2015, 01:20 AM

html5 validation "required" not working inside RadWizard.  But same is working in asp:Wizard. 

 Working     

 

<asp:Wizard ID="Wizard1" runat="server">
    <WizardSteps >
        <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
            <asp:TextBox ID="TextBox1"  required="" type="text" placeholder="Try it out." runat="server"></asp:TextBox>
        </asp:WizardStep>
        <asp:WizardStep ID="WizardStep2"  runat="server" Title="Step 2">
            <asp:TextBox ID="TextBox2"  required="" type="text" placeholder="Try it out." runat="server"></asp:TextBox>
        </asp:WizardStep>
    </WizardSteps>
</asp:Wizard>

 

 

NOT WORKING

 

<telerik:RadWizard ID="ADSRadWizard" runat="server">
    <WizardSteps >
        <telerik:RadWizardStep ID="WizardStep3" runat="server" Title="Step 1">
            <telerik:RadTextBox ID="RadTextBox1" required="" type="text" placeholder="Try it out." runat="server"></telerik:RadTextBox>
        </telerik:RadWizardStep>
        <telerik:RadWizardStep ID="WizardStep4"  runat="server" Title="Step 2">
            <telerik:RadTextBox ID="RadTextBox2" required="" type="text" placeholder="Try it out."  runat="server"></telerik:RadTextBox>
        </telerik:RadWizardStep>
    </WizardSteps>
</telerik:RadWizard>

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 03 Jul 2015, 08:11 AM
Hi,

Thank you for contacting Telerik support.

By default RadWizard supports only client and server-side ASP.NET validation.The native HTML5 validation is only triggered when the submit button is used while unfortunately RadWizard does not render submit button and that is why the validation is not used. 

Hope this will explain the issue. If you have further questions please don't hesitate to contact us again.

Regards,
Plamen
Telerik
0
Dev
Top achievements
Rank 1
answered on 14 Jul 2015, 07:39 AM

Hi

 Is there any workaround to achieve validation in User Controls used inside wizard steps?  The problem is we are using User Controls both in aspx page and inside wizard steps.  We fully rely on HTML5 validations, because of this telerik limitation, we need to use both HTML5 and Server-Side validation which is redundant. 

0
Plamen
Telerik team
answered on 17 Jul 2015, 05:38 AM
Hello,

One possible way to use the HTML 5 validation with the current version of RadWizard is to use a custom button instead of the default navigation buttons. Here is a sample code that worked at my side:
<telerik:RadWizard ID="ADSRadWizard" runat="server" DisplayNavigationButtons="false">
    <WizardSteps >
        <telerik:RadWizardStep ID="WizardStep3" runat="server" Title="Step 1">
            <telerik:RadTextBox ID="RadTextBox1" required="" type="text" placeholder="Try it out." runat="server"></telerik:RadTextBox>
            <asp:Button runat="server" OnClick="Unnamed_Click" Text="Next" />
        </telerik:RadWizardStep>
        <telerik:RadWizardStep ID="WizardStep4"  runat="server" Title="Step 2" Enabled="false">
         next step
        </telerik:RadWizardStep>
    </WizardSteps>
</telerik:RadWizard>

protected void Unnamed_Click(object sender, EventArgs e)
   {
       WizardStep4.Enabled = true;
       ADSRadWizard.ActiveStepIndex = 1;
   }

Hope this will be helpful.

Regards,
Plamen
Telerik
Tags
Wizard
Asked by
Dev
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Dev
Top achievements
Rank 1
Share this question
or