I have two html input
in one form, and I am setting them to required as follows:
<input id="email" name="textfield36" type="text" class="input3" runat="server" required="required" />
<input id="frEmail" name="textfield36" type="text" class="input3" runat="server" required="required" />
I need to set the Required
attribute to false to one of the two inputs from c#. For example:
if (language == "English")
{
frEmail.Attributes.Add("required", "false");
}
else
{
email.Attributes.Add("required", "false");
}
This is causing an issue, because if the language is English, then the user only needs to fill the specified fields and the way it's happening now is that he's obliged to fill them all and vice versa. Note that on load I'm hiding the fields not relating to the language.
Can anyone help on this?