Skip to content
Everett Griffiths edited this page May 20, 2014 · 2 revisions

Radio

Radio fields are functionally equivalent to dropdown fields, but the formatting is more problematic because of how the formatting strings need to be stacked on top of one another.

Syntax: radio($name,$options=array(),$default='',$args=array(),$tpl=null)

Simple options:

<?php
print \Formbuilder\Form::radio('attending',array('Yes','No','Maybe'));
?>

Complex options:

<?php
print \Formbuilder\Form::radio('attending',array('y'=>'Yes','n'=>'No','m'=>'Maybe'));
?>
Clone this wiki locally