SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict kuldeepkaundal's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    unchecked radio buttons in cakephp

    hello,

    Is there a way in cakephp to make a radio button to not to appear as selected/checked, b'coz i am trying following code, but, here i am getting the last radio button as selected:

    <tr>

    <td width="50%" align="center" valign="middle"><?php echo $form->radio('Vote.sug' , array( 'sug5' => '') , array('value' => '1' ,'id' => 'sug5')); ?></td>
    </tr>

    <tr>

    <td width="50%" align="center" valign="middle"><?php echo $form->radio('Vote.sug' , array( 'sug6' => '') , array('value' => 'sug6' ,'id' => 'sug6')); ?></td>
    </tr>

    Thanks in advance,
    kul

  2. #2
    SitePoint Addict kuldeepkaundal's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it impossible to achieve?

  3. #3
    SitePoint Addict CWebguy's Avatar
    Join Date
    Mar 2009
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know about cakePHP but on this site the radio form is not selected. http://www.w3schools.com/html/html_forms.asp

  4. #4
    SitePoint Addict kuldeepkaundal's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, i know in HTML its easier to control using option 'checked' ='checked' but, i want to do it in cakephp

  5. #5
    SitePoint Addict kuldeepkaundal's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, Its Done!


Bookmarks

Posting Permissions

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