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

render_resource_type_selector_question()

Parameters

ColumnTypeDefaultDescription
$label string
$name string
$class string "stdwidth"
$hidden bool false
$current
true
false
true;

Location

include/render_functions.php lines 6512 to 6529

Definition

 
function render_resource_type_selector_question(string $labelstring $namestring $class "stdwidth"bool $hidden false$current 0) : void
    
{
    global 
$lang;
    
$resource_types get_resource_types('',true,false,true);

    echo 
"<div class='Question' id='" escape($name) . "'" . ($hidden " style='display:none;border-top:none;'" "") . ">";
    echo 
"<label for='" escape($name) . "' >" escape($label) . "</label>";
    echo 
"<select name='" escape($name) . "' id='" escape($name) . "' class='" $class "'>";
    echo 
"<option value='' selected >" escape($lang["select"]) . "</option>";
    foreach(
$resource_types as $resource_type)
        {
        
$selected = ($resource_type["ref"] == $current "selected" "");
        echo 
"<option value='{$resource_type['ref']}{$selected}>" escape(lang_or_i18n_get_translated($resource_type['name'],'fieldtitle-')) . "</option>";
        }
    echo 
"</select>";
    echo 
"<div class='clearerleft'></div>";
    echo 
"</div>";
    }

This article was last updated 21st May 2024 21:35 Europe/London time based on the source file dated 17th May 2024 16:45 Europe/London time.