Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: OkToEmail not selected by default and make it a required field

  1. #1
    conquernext is offline Junior Member
    Join Date
    Oct 2009
    Posts
    3

    Default OkToEmail not selected by default and make it a required field

    We are able to change the default for OkToEmail to either Yes or No, however we want to be able to not preselect and leave both options unchecked and have the customer select what they prefer. However we need this to be a required field as well so that it doesn't submit the form before a selection of Yes or No is made.

    Any advise on how to accomplish this?

    Thanks

  2. #2
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    Not sure if this will work as I've never tried it on a mandatory field but within createaccount.aspx.cs try changing

    OKToEMailYes.Checked = (ThisCustomer.EMail.Length != 0);
    OKToEMailNo.Checked = !OKToEMailYes.Checked;

    to

    OKToEMailYes.Checked = false; // (ThisCustomer.EMail.Length != 0);
    OKToEMailNo.Checked = false; // !OKToEMailYes.Checked;

  3. #3
    conquernext is offline Junior Member
    Join Date
    Oct 2009
    Posts
    3

    Default

    Yup I had already given that a shot, the problem is that it doesn't get validated as a required field and when the account is created it defaults to NO



    Quote Originally Posted by deanfp View Post
    Not sure if this will work as I've never tried it on a mandatory field but within createaccount.aspx.cs try changing

    OKToEMailYes.Checked = (ThisCustomer.EMail.Length != 0);
    OKToEMailNo.Checked = !OKToEMailYes.Checked;

    to

    OKToEMailYes.Checked = false; // (ThisCustomer.EMail.Length != 0);
    OKToEMailNo.Checked = false; // !OKToEMailYes.Checked;