__('Radio Buttons', __FILE__), // Module Title 'summary' => __('Radio buttons for selection of a single item', __FILE__), // Module Summary 'version' => 102, 'permanent' => true, ); } public function init() { $this->set('optionColumns', 0); parent::init(); } public function ___render() { $this->checkDefaultValue(); $inline = false; $columns = (int) $this->optionColumns; if($columns === 1) $inline = true; $options = $this->getOptions(); $liAttr = ''; if($columns) { if(count($options) >= $columns && !$inline) { $liWidth = round(100 / $columns)-1; // 1% padding-right added from stylesheet $liAttr = " style='width: {$liWidth}%;'"; $ulClass = 'InputfieldRadiosColumns'; } else { // don't bother setting a width, we will let them float where they want instead $ulClass = 'InputfieldRadiosFloated'; } $out = "\n\t