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

admin_resource_type_field_constraint()

Description

Display appropriate field constraint for use on admin_resource_type_field_edit.php e.g. single select/Number

Parameters

ColumnTypeDefaultDescription
$ref int
$currentvalue: int
array"i"
0
"schema";
Metadata int field ID
Current int field type

Return

void *

Location

include/render_functions.php lines 6423 to 6438

Definition

 
function admin_resource_type_field_constraint(int $refint $currentvalue): void
    
{
    global 
$lang;
    
$constraint=ps_value("SELECT field_constraint value FROM resource_type_field WHERE ref=?",array("i",$ref),0"schema");
    
?>
        <div class="clearerleft"></div>
    </div> <!-- end question -->
    <div class="Question">
        <label>  echo escape($lang["property-field_constraint"]) ?></label>
        <select id="field_constraint" name="field_constraint" class="stdwidth" onchange="CentralSpacePost(this.form);">

            <option value="0"  if ($constraint==0) { echo " selected"; } ?>> echo escape($lang["property-field_constraint-none"]) ?></option>
            <option value="1"  if ($constraint==1) { echo " selected"; } ?>> echo escape(($currentvalue==FIELD_TYPE_TEXT_BOX_SINGLE_LINE $lang["property-field_constraint-number"] : $lang["property-field_constraint-singlekeyword"]))?></option>
        </select>
        
    
}

This article was last updated 8th December 2024 08:35 Europe/London time based on the source file dated 5th December 2024 17:20 Europe/London time.