$myForm = new Varien_Data_Form(); $myForm->addField('first_name', 'text', array( 'label' => 'First Name', 'required' => true, 'name' => 'first_name' ));
$myForm = new Varien_Data_Form(); $myForm->addField('gender', 'radio', array( 'label' => 'Gender', 'required' => true, 'name' => 'gender', 'values' => array( array('value' => 'male', 'label' => 'Male'), array('value' => 'female', 'label' => 'Female') ) ));This example adds a radio button group for selecting the user's gender. The 'values' option is used to specify the available options for the radio buttons. Overall, the Varien_Data_Form addField method is a useful tool for constructing data collection forms in PHP, and can be found in the Magento PHP library.