Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

render_dropdown_question()

Description

render_dropdown_question - Used to display a question with a dropdown selector

Parameters

ColumnTypeDefaultDescription
$label string Label of question
$inputname
$options array array Array of options (value and text pairs) (eg. array('pixelwidthmin'=>'From','pixelwidthmin'=>'To')
$current ""
$extra ""
$input string name of input field

Location

include/render_functions.php lines 1369 to 1388

Definition

 
function render_dropdown_question($label$inputname$options = array(), $current=""$extra="")
    {
    
?>
    <div class="Question" id = "pixelwidth">
        <label> echo $label?></label>
        <select  name=" echo $inputname?>" id=" echo $inputname?> echo $extra?>>
        
        
foreach ($options as $optionvalue=>$optiontext)
            {
            
?>
            <option value=" echo htmlspecialchars(trim($optionvalue))?> if (trim($optionvalue)==trim($current)) {?>selected ?>> echo htmlspecialchars(trim($optiontext))?></option>
            
            
}
        
?>
        </select>

    </div>
    <div class="clearerleft"> </div>
    
    
}

This article was last updated 14th July 2020 01:05 Europe/London time based on the source file dated 8th July 2020 11:40 Europe/London time.