Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

render_text_question()

Description

render_text_input_question - Used to display a question with simple text input

Parameters

ColumnTypeDefaultDescription
$label string Label of question
$input string Name of input field
$additionaltext string "" Text to to display after input
$numeric boolean false Set to true to force numeric input
$extra ""
$current ""
$ctx array array Rendering context. Should be used to inject different elements (e.g set the div class)

Return

void

Location

include/render_functions.php lines 1329 to 1349

Definition

 
function render_text_question($label$input$additionaltext=""$numeric=false$extra=""$current="", array $ctx = array())
    {
    
$div_class = array("Question");
    if(isset(
$ctx["div_class"]) && is_array($ctx["div_class"]) && !empty($ctx["div_class"]))
        {
        
$div_class array_merge($div_class$ctx["div_class"]);
        }
    
?>
    <div id="pixelwidth" class=" echo implode(" "$div_class); ?>" >
        <label> echo $label?></label>
        <div>
        
        
echo "<input name=\"" $input "\" type=\"text\" ". ($numeric?"numericinput":"") . "\" value=\"" $current "\"" $extra "/>\n";
            
        echo 
$additionaltext;
        
?>
        </div>
    </div>
    <div class="clearerleft"> </div>
    
    
}

This article was last updated 24th November 2020 17:05 Europe/London time based on the source file dated 13th November 2020 15:00 Europe/London time.