When ‘length’ and ‘read-only’ are overridden in field metadata, neither is enforced in the UI.
Note
- This occurs whether model is marked to process client side or not.
- Read-Only previous identified here https://community.skuid.com/t/override-field-metadata-read-only-not-working. Mentioning it here as well to “bump” the issue and also since it’s likely related to the length not being enforced as well.
Steps to reproduce:
- Create page using xml below
- Preview page
Expected Behavior
Billing City is read-only
Actual Behavior
Billing city is editable
- Type something longer than 5 characters in to Account Name
Expected Behavior
Input stops at 5 characters
Actual Behvior
INput does not stop
- Click Save
Expected Behavior
Error message displayed indicating data is invalid because length > 5
Actual Behavior
Records saves successfully, no data truncation, no enforcement of 5 character limit
Sample Page XML
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account"> <models>
<model id="Account" limit="" query="true" createrowifnonefound="false" sobject="Account" adapter="" type="" doclone="" processonclient="true">
<fields>
<field id="Name" overridemetadata="true" ogdisplaytype="STRING" displaytype="TEXT" length="5" label="" helptext="" readonly="true"/>
<field id="CreatedDate"/>
<field id="BillingCity" overridemetadata="true" ogdisplaytype="STRING" displaytype="TEXT" readonly="true"/>
</fields>
<conditions>
<condition type="param" value="id" field="Id" operator="=" enclosevalueinquotes="true" novaluebehavior=""/>
</conditions>
<actions/>
</model>
</models>
<components>
<pagetitle model="Account" uniqueid="sk-3IeBVh-70">
<maintitle>
<template>{{Name}}</template>
</maintitle>
<subtitle>
<template>{{Model.label}}</template>
</subtitle>
<actions>
<action type="savecancel" window="self"/>
</actions>
</pagetitle>
<basicfieldeditor showsavecancel="false" showheader="true" model="Account" mode="edit" uniqueid="sk-3IeBVh-71" buttonposition="">
<columns>
<column width="100%">
<sections>
<section title="Basics" collapsible="no">
<fields>
<field id="Name" valuehalign="" type=""/>
<field id="BillingCity"/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>