CakePHP question about html helpers

Discussion in 'PHP' started by dshuck, Feb 6, 2008.

  1. #1
    I have am just starting out my first CakePHP app, and have a question about the form html helpers.

    When I do this....
    <?php echo $html->inputTag('User/username', array('size' => '40')) ?> 
    Code (markup):
    ...it appears that the size attribute is ignored. In fact, the only attributes that are created are name and value like this:
    <input name="data[User][username]" value="" /> 
    Code (markup):
    Just for experimentation purposes, when I change "inputTag" to "passwordTag", it appears that all the attributes are created properly like this:
    <input type="password" name="data[User][username]"  size="40" value="" id="UserUsername" /> 
    Code (markup):
    Does anyone have any idea what I am missing in order to leverage the inputTag() method?
     
    dshuck, Feb 6, 2008 IP
  2. dshuck

    dshuck Peon

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well, apparently the docs I am reading are dated. I noticed that they current API uses input() instead of inputTag(). Additionally the current API seems to support password() in addition to passwordTag().

    case closed....
     
    dshuck, Feb 6, 2008 IP