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

render_question_form_helper()

Description

Render a FormHelper. These are used in forms, to provide extra information to the user to a question.

Parameters

ColumnTypeDefaultDescription
$txt string Help text
$id string Div ID
$ctx array Contextual data

Location

include/render_functions.php lines 5501 to 5522

Definition

 
function render_question_form_helper(string $txtstring $id, array $ctx)
    {
    
$txt trim($txt);
    
$id trim($id);

    if(
$txt === '' || $id === '')
        {
        return;
        }

    
$ctx_class = (isset($ctx['class']) && is_array($ctx['class']) ? $ctx['class'] : array());
    
$ctx_style = (isset($ctx['style']) && is_string($ctx['style']) ? $ctx['style'] : ''); # Use a class if possible!


    
$class escape(join(' 'array_merge(array('FormHelp'), $ctx_class)));
    
$style = (trim($ctx_style) !== '' sprintf(' style="%s"'escape($ctx_style)) : '');
    
?>
    <div id="help_ echo escape($id); ?>" class=" echo $class?>" echo $style?>>
        <div class="FormHelpInner"> echo escape($txt); ?></div>
    </div>
    
    
}

This article was last updated 19th March 2024 11:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.