Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2009
    Posts
    160
    Thanks
    40
    Thanked 1 Time in 1 Post

    add a class to a php field

    I am having trouble adding a class to a php form field.

    the field:
    Code:
     <?php echo tep_draw_input_field('email_address'); ?>
    I can add a class to all input elements but I dont want my styling to apply to all input elements on my site.

    Spanning a class does not work either.

    What can i do?

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    You should consult the documentation for osCommerce since that seems to be where that function comes from. Unfortunately, I had trouble finding a simple function reference. This post elsewhere answer a similar question on how to set a text input size. Apparently, the desired attributes should be passed as a string in the third argument to the function, according to this other post.
    Are you a Help Vampire?

  • Users who have thanked tomws for this post:

    sackstein (05-12-2010)

  • #3
    Regular Coder
    Join Date
    Jan 2009
    Posts
    160
    Thanks
    40
    Thanked 1 Time in 1 Post
    Awesome! yep you are right the trick was it needed to be entered as the third argument. Thanks!

  • #4
    New to the CF scene
    Join Date
    May 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    great job, it's working


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •