"> <label for="">Gender</label> <?php echo checkboxesOrRadios(['male' => 'Male', 'female' => 'Female'], $gender, 'gender', 'radio'); ?> <?php echo displayErrors($validationErrors, 'gender'); ?> </div> <div class="<?php echo getFieldClass($validationErrors, 'color'); ?> "> <label for="">Favorite Color</label> <?php echo checkboxesOrRadios([COLOR_RED => 'Red', COLOR_GREEN => 'Green', COLOR_BLUE => 'Blue'], $colors, 'color[]'); ?> </div> <div class="<?php echo getFieldClass($validationErrors, 'form_of_address'); ?> "> <label for="form_of_address">Password</label> <select name="form_of_address" id=""> <option value="">--Choose Form Of Address--</option> <?php echo options([FORM_OF_ADDRESS_MR => 'Mr.', FORM_OF_ADDRESS_MRS => 'Mrs.', FORM_OF_ADDRESS_MS => 'Ms.'], $formOfAddress); ?> </select> <?php echo displayErrors($validationErrors, 'form_of_address');
?> </div> </div> </div> <div class="col-lg-6"> <div> </div> <form action="pageA.php" method="get" role="form"> <div class="form-group <?php echo getFieldClass($validationErrors, 'gender'); ?> "> <?php echo checkboxesOrRadios(['male' => 'Male', 'female' => 'Female'], $gender, 'gender', 'radio'); ?> <?php echo displayErrors($validationErrors, 'gender', 'control-label'); ?> </div> <div class="form-group <?php echo getFieldClass($validationErrors, 'product'); ?> "> <label for="product" class="control-label">Product</label> <select name="product" id="product" class="form-control"> <option value="">--choose-product--</option> <?php echo options($products, $product);
function checkboxes($data, $name, $checked) { return checkboxesOrRadios($data, $name, $checked, 'checkbox'); }
echo getFieldClass($validationErrors, 'temperature'); ?> "> <label for="temperature" class="control-label">Temperature</label> <input type="number" id="temperature" name="temperature" class="form-control"/> <?php echo displayErrors($validationErrors, 'temperature', 'control-label'); ?> </div> <div class="form-group"> <div class="<?php echo getFieldClass($validationErrors, 'inputTemperature'); ?> "> <?php echo checkboxesOrRadios(['celsius' => 'Celsius', 'fahrenheit' => 'Fahrenheit'], $inputTemperature, 'input-temperature', 'radio'); ?> <?php echo displayErrors($validationErrors, 'inputTemperature', 'control-label'); ?> </div> </div> <div class="form-group"> <input type="submit" class="btn btn-primary" value="Calculate"/> </div> <div class="form-group"> <label for="output-temperature" class="control-label">Temperature in <?php echo $outputTemperature; ?> </label> <textarea name="output-temperature" id="output-temperature" class="form-control" cols="30" rows="2">