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_fixed_text_question()

Description

Renders a 'fixed' text question - not an input but to display information or values that cannot be changed

Parameters

ColumnTypeDefaultDescription
$label string Question label
$text string Fixed text
$helptext string "" Optional div identifier
$divid string
"%label" > escape$label
"%text" > escape$text
"%helptextdiv"
escape$helptext
: $help_html
];
$replace
* $fixed_html; } /**
| ENT_QUOTES ""
$name string "icon"
$current string ""

Location

include/render_functions.php lines 5956 to 5979

Definition

 
function render_fixed_text_question(string $labelstring $textstring $helptext ""string $divid ""): void
{
    
$fixed_html '
        <div class="Question" %identifier>
            <label>%label</label>
            <div class="Fixed">%text</div>
            <div class="clearerleft"></div>
            %helptextdiv
        </div>'
;

    
$help_html '
        <div class="FormHelp" style="padding:0; clear:left;" >
            <div class="FormHelpInner">%helptext</div>
        </div>'
;

    
$replace = [
        
"%identifier" => (trim($divid) != '' ' id="' escape($divid) . '"' ''),
        
"%label" => escape($label),
        
"%text" => escape($text),
        
"%helptextdiv" => (trim($helptext) != "" str_replace("%helptext"escape($helptext), $help_html) : ""),
    ];

     echo 
str_replace(array_keys($replace),$replace,$fixed_html);
}

This article was last updated 17th November 2024 15:35 Europe/London time based on the source file dated 13th November 2024 14:05 Europe/London time.