CreateRadioGroup

General project discussion. NOT for help questions.
Post Reply
ceilingfish

CreateRadioGroup

Post by ceilingfish »

I am looking at the source for 10.3 and I can't find where the last argument addtext is used.

Code: Select all

function CreateInputRadioGroup($id, $name, $items, $selectedvalue='', $addttext='')
Looking at the others it seems to indicate an amount of text to insert inside the tag that's generated. Which I have been able to use to insert ids.

Does anyone know if this has been fixed anywhere? Or if I am being blind.

Cheers,
Tom
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: CreateRadioGroup

Post by Ted »

Yeah, that's a bug.  I've committed the change to svn.  The function looks like:

Code: Select all

    function CreateInputRadioGroup($id, $name, $items, $selectedvalue='', $addttext='')
    {   
        $text = '';
        foreach ($items as $key=>$value)
        {   
            $text .= '<input type="radio" name="'.$id.$name.'" value="'.$value.'"';
            if ($addttext != '')
            {  
                $text .= ' ' . $addttext;
            }  
            if ($selectedvalue == $value)
            {   
                $text .= ' ' . 'checked="checked"';
            }  
            $text .= ' />';
            $text .= $key;
        }

        return $text;
    }
Thanks!
Post Reply

Return to “General Discussion”