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 5 of 5

Thread: "Ok to email" checkbox

  1. #1
    ryanjm is offline Junior Member
    Join Date
    Jan 2010
    Posts
    18

    Default "Ok to email" checkbox

    I can't find where this is written out by the system. I'd like to set the default to "yes" instead of "no"

  2. #2
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    In 8.x and earlier, that's just added as a radiobutton on the .aspx page. For example createaccount.aspx:

    Code:
    <asp:RadioButton ID="OKToEMailYes" GroupName="OKToEMail" runat="server" />
    In 9.x, that's part of the Address control, which you would need source to modify. That's in the AspDotNetStorefrontControls project.

  3. #3
    ryanjm is offline Junior Member
    Join Date
    Jan 2010
    Posts
    18

    Default

    This one is version 8. I'm not sure how to edit this to make it default to Yes instead of No though. I don't see any code in the Yes or No asp lines that suggests either should be checked, yet "No" is default as checked.

    I tried <asp:RadioButton ID="OKToEMailYes" Selected="True" GroupName="OKToEMail" runat="server" /> without success.

    Thanks for the help.
    Last edited by ryanjm; 05-17-2010 at 09:00 AM.

  4. #4
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Open your createaccount.aspx.cs and follow the changes below.

    from:
    Code:
    OKToEMailYes.Checked = (ThisCustomer.EMail.Length != 0);
    OKToEMailNo.Checked =  !OKToEMailYes.Checked;
    to:
    Code:
    OKToEMailYes.Checked = true;  // (ThisCustomer.EMail.Length != 0);
    OKToEMailNo.Checked = false; // !OKToEMailYes.Checked;

  5. #5
    ryanjm is offline Junior Member
    Join Date
    Jan 2010
    Posts
    18

    Default

    Worked, thanks!