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: Change background color on credit card number fields

  1. #1
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default Change background color on credit card number fields

    Hi,

    I'm looking to chcange the background color on the input fields for credit card number, expiration date, cvv, etc. I found where to change the color for address fields but can't seem to find the same for the CC info. Any suggestions?

    Thanks!

  2. #2
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Sure, this is possible. If you have the source code, add a class attribute to the input type of the CardNumber, on the Address.cs, InputCardHTML method. Then add a CSS prototype and tie it to the class value you specified and that's it...

  3. #3
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default

    I tried the following to no avail. Can you provide me with a code example?

    Thanks!

    Code:
    <input type=\"text\" CssClass=\"CredCardBG\" autocomplete=\"off\" name=\"CardNumber\" id=\"CardNumber\" size=\"20\" maxlength=\"20\" value=\"" + AppLogic.SafeDisplayCardNumber(CardNumber, "Address", m_AddressID) + "\"> " + AppLogic.GetString("shoppingcart.cs.106", m_SkinID, m_LocaleSetting) + "\n");

  4. #4
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    It should be:
    Code:
    <input type=\"text\" class=\"CredCardBG\" autocomplete=\"off\" name=\"CardNumber\" id=\"CardNumber\" size=\"20\" maxlength=\"20\" value=\"" + AppLogic.SafeDisplayCardNumber(CardNumber, "Address", m_AddressID) + "\"> " + AppLogic.GetString("shoppingcart.cs.106", m_SkinID, m_LocaleSetting) + "\n");

  5. #5
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Why do you need to add a class if it already has an ID?

    id=\"CardNumber\"
    You can can target the id in your css


    TTFN

    BFG