Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource 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 6172 to 6187

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 29th May 2024 09:05 Europe/London time based on the source file dated 23rd May 2024 10:00 Europe/London time.