Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 5620 to 5641

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 8th December 2024 20:35 Europe/London time based on the source file dated 5th December 2024 17:20 Europe/London time.