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 1504 to 1522

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="question_ echo $input?>" class=" echo implode(" "$div_class); ?>" >
        <label> echo $label?></label>
        
        
echo "<input name=\"" $input "\" type=\"" . ($numeric "number" "text") . "\" value=\"" $current "\"" $extra "/>\n";
            
        echo 
$additionaltext;
        
?>
        <div class="clearerleft"> </div>
    </div>
    
    
}

This article was last updated 7th March 2021 11:05 Europe/London time based on the source file dated 5th March 2021 17:45 Europe/London time.