src/UI/HTML/FormElements.php
public static function RadioGroup( $name, $options, $class = NULL, $readOnly = NULL )
	{
		$radios	= array();
		foreach( $options as $value => $label )
		{
			if( (string) $value == '_selected' )
				continue;
			$selected	= isset( $options['_selected'] ) ? (string) $value == (string) $options['_selected'] : NULL;
			$radio		= self::Radio( $name, $value, $selected, $class, $readOnly );
			$spanRadio	= UI_HTML_Tag::create( "span", $radio, array( 'class' => 'radio' ) );
			$label		= UI_HTML_Tag::create( "label", $label, array( 'for' => $name."_".$value ) );
			$spanLabel	= UI_HTML_Tag::create( "span", $label, array( 'class' => 'label' ) );
			$content	= UI_HTML_Tag::create( "span", $spanRadio.$spanLabel, array( 'class' => 'radiolabel' ) );
			$radios[]	= $content;
		}
		$group	= implode( "", $radios );
		return $group;
	}
public static function RadioGroup( $name, $options, $class = NULL, $readOnly = NULL )
	{
		$radios	= array();
		foreach( $options as $value => $label )
		{
			if( (string) $value == '_selected' )
				continue;
			$selected	= isset( $options['_selected'] ) ? (string) $value == (string) $options['_selected'] : NULL;
			$radio		= self::Radio( $name, $value, $selected, $class, $readOnly );
			$spanRadio	= UI_HTML_Tag::create( "span", $radio, array( 'class' => 'radio' ) );
			$label		= UI_HTML_Tag::create( "label", $label, array( 'for' => $name."_".$value ) );
			$spanLabel	= UI_HTML_Tag::create( "span", $label, array( 'class' => 'label' ) );
			$content	= UI_HTML_Tag::create( "span", $spanRadio.$spanLabel, array( 'class' => 'radiolabel' ) );
			$radios[]	= $content;
		}
		$group	= implode( "", $radios );
		return $group;
	}
public static function RadioGroup ( $ name , $ options , $ class = NULL , $ readOnly = NULL ) { $ radios = array ( ) ; foreach ( $ options as $ value => $ label ) { if ( ( string ) $ value == '_selected' ) continue ; $ selected = isset ( $ options [ '_selected' ] ) ? ( string ) $ value == ( string ) $ options [ '_selected' ] : NULL ; $ radio = self :: Radio ( $ name , $ value , $ selected , $ class , $ readOnly ) ; $ spanRadio = UI_HTML_Tag :: create ( "span" , $ radio , array ( 'class' => 'radio' ) ) ; $ label = UI_HTML_Tag :: create ( "label" , $ label , array ( 'for' => $ name . "_" . $ value ) ) ; $ spanLabel = UI_HTML_Tag :: create ( "span" , $ label , array ( 'class' => 'label' ) ) ; $ content = UI_HTML_Tag :: create ( "span" , $ spanRadio . $ spanLabel , array ( 'class' => 'radiolabel' ) ) ; $ radios [ ] = $ content ; } $ group = implode ( "" , $ radios ) ; return $ group ; }
Builds HTML for a Group of Radio Buttons, behaving like a Select.
@access		public
@static
@param		string		$name			Field Name
@param		array		$options		Array of Options
@param		string		$class			CSS Class
@param		mixed		$readOnly		Field is not writable, JavaScript Alert if String is given
@return		string
Builds HTML for a Group of Radio Buttons behaving like a Select .