Comments (8)
Sure! I think you can sort of do it already with formDefaults
in globalOptions, but it's a good idea.
from angular-schema-form.
That's an excellent alternative! Unfortunately, though, I'm not having any luck with it:
<form sf-model="data" sf-form="form" sf-schema="schema" sf-options="{ formDefaults: { readonly: true } }"></form>
Is this how it might be specified?
Thanks for the lightning-quick response!
from angular-schema-form.
Haha, never mind – I found an error on my end :) I'm more than happy calling this one closed. Thanks again for the help!
from angular-schema-form.
Actually... that bug wasn't exactly on my end. sfOptions
should be evaluated in the presence of the user's scope. This lets us specify the options dynamically. PR coming...
from angular-schema-form.
Actually, read-only on an object (as in top-level schema) should make everything in that object read only, since changing anything in that object should be prohibited.
from angular-schema-form.
Should be fixed whenever #61 is fixed...
from angular-schema-form.
formObject.schemaOptions.formDefaults.readOnly = true makes entire form readonly
its already there, unless am missing something?
from angular-schema-form.
@deepkamal I think what you're missing is that while setting formObject.schemaOptions.formDefaults.readOnly = true
does indeed make the form readOnly there is then no easy way to make it editable again. Setting it to false' and triggering the
schemaFormRedrawevent doesn't have any effect as the
readonlyattribute has been set on each field and only
readOnly=truevalue is inherited from
formDefaults,
readOnly=false` is ignored (as indeed it should be).
from angular-schema-form.
Related Issues (20)
- Conditionals for arrays inside arrays
- Maintenance status of the library
- How to show default value in type select titleMAP
- Conditional required rule HOT 1
- Add-on ngModel builder seems to not work at all HOT 3
- Add-on with ng-model="$$value$$" not binding properly in an array HOT 2
- condition is not supported for IE HOT 7
- Required validation messages
- version(0.8.14) regression in conditional array validation HOT 3
- Schema form for Android HOT 1
- Array type schemas do not render HOT 4
- Dynamic Type's from Model
- Form Update
- Form generation for part of schema HOT 1
- npm angular-schema-form uses 0.8.13 rather than 0.8.14 HOT 1
- Broadcast schemaform.error.* broken
- errors in bootstrap templates
- files endpoint option
- checkbox not styled with bootstrap
- Custom layout for specific property/ies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-schema-form.