Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 5144 to 5166

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

This article was last updated 28th February 2021 16:05 Europe/London time based on the source file dated 22nd February 2021 17:55 Europe/London time.