Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

config_text_input()

Description

Generate an html text entry or password block

field. Defaulted to false.

Parameters

ColumnTypeDefaultDescription
$name string the name of the text block. Usually the name of the config variable being set.
$label string the user text displayed to label the text block. Usually a $lang string.
$current string the current value of the config variable being set.
$password boolean false whether this is a "normal" text-entry field or a password-style
$width integer 420 the width of the input field in pixels. Default: 420.
$textarea false
$title null
$autosave false

Location

include/config_functions.php lines 383 to 428

Definition

 
function config_text_input($name$label$current$password false$width 420$textarea false$title null$autosave false)
    {
    global 
$lang;

    if(
is_null($title))
        {
        
// This is how it was used on plugins setup page. Makes sense for developers when trying to debug and not much for non-technical users
        
$title str_replace('%cvn'$name$lang['plugins-configvar']);
        }
    
?>

    <div class="Question" id="question_ echo $name?>">
        <label for=" echo $name?>" title=" echo $title?>"> echo $label?></label>
    
    
if($autosave)
        {
        
?>
        <div class="AutoSaveStatus">
            <span id="AutoSaveStatus- echo $name?>" style="display:none;"></span>
        </div>
        
        
}

    if(
$textarea == false)
        {
        
?>
        <input id=" echo $name?>"
               name=" echo $name?>"
               type=" echo $password 'password' 'text'?>"
               value=" echo htmlspecialchars($currentENT_QUOTES); ?>"
                if($autosave) { ?>onFocusOut="AutoSaveConfigOption(' echo $name?>');" ?>
               style="width: echo $width?>px" />
        
        
}
    else
        {
        
?>
        <textarea id=" echo $name?>" name=" echo $name?>" style="width: echo $width?>px"> echo htmlspecialchars($currentENT_QUOTES); ?></textarea>
        
        
}
        
?>
        <div class="clearerleft"></div>
    </div>

    
    
}

This article was last updated 30th November 2020 16:35 Europe/London time based on the source file dated 6th October 2020 10:25 Europe/London time.