Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

render_split_text_question()

Description

render_split_text_question - Used to display a question with two inputs e.g. for a from/to range

Parameters

ColumnTypeDefaultDescription
$label string Label of question
$inputs array array Array of input names and labels(eg. array('pixelwidthmin'=>'From','pixelwidthmin'=>'To')
$additionaltext string "" (optional) Text to to display after input
$numeric boolean false Set to true to force numeric input
$extra ""
$currentvals array

Location

include/render_functions.php lines 1617 to 1635

Definition

 
function render_split_text_question($label$inputs = array(), $additionaltext=""$numeric=false$extra=""$currentvals=array())
    {
    
?>
    <div class="Question" id = "pixelwidth">
        <label> echo $label?></label>
        <div>
        
        
foreach ($inputs as $inputname=>$inputtext)
            {
            echo 
"<div class=\"SplitSearch\">" $inputtext "</div>\n";
            echo 
"<input name=\"" $inputname "\" class=\"SplitSearch\" type=\"text\"". ($numeric?"numericinput":"") . "\" value=\"" $currentvals[$inputname] . "\"" $extra " />\n";
            }
        echo 
$additionaltext;
        
?>
        </div>
    </div>
    <div class="clearerleft"> </div>
    
    
}

This article was last updated 18th April 2024 18:35 Europe/London time based on the source file dated 17th April 2024 16:25 Europe/London time.