Collections functions
General 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 5505 to 5527

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_quoted_data(join(' 'array_merge(array('FormHelp'), $ctx_class)));
    
$style = (trim($ctx_style) !== '' sprintf(' style="%s"'escape_quoted_data($ctx_style)) : '');
    
?>
    <div id="help_ echo escape_quoted_data($id); ?>" class=" echo $class?>" echo $style?>>
        <div class="FormHelpInner"> echo htmlspecialchars($txt); ?></div>
    </div>
    
    
return;
    }

This article was last updated 29th November 2023 09:35 Europe/London time based on the source file dated 21st November 2023 09:30 Europe/London time.