You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
protected tempFormContent:any={"components": [{"label": "How do YOU define 1","spellcheck": true,"tableView": true,"validate": {"unique": false,"multiple": false},"key": "key1","type": "textarea","input": true,"defaultValue": defValuekey1Saved,description: "...."},{"label": "How do YOU define 2","spellcheck": true,"tableView": true,"validate": {"unique": false,"multiple": false},"key": "key2","type": "textarea","input": true,"defaultValue": defValuekey2Saved,description: "...."},{"type": "button","label": "Save and Next","key": "submit","disableOnInvalid": true,"input": true,"tableView": false,"validate": {"unique": false,"multiple": false}}]};//returning the value used in the HTML templatepublicgetprojectFormContent():any {returnthis.tempFormContent;
BUT is there some group default setting, I've tried this, but NOT working:
protected tempFormContent:any={"components": [{"label": "How do YOU define 1","spellcheck": true,"tableView": true,"validate": {"unique": false,"multiple": false},"key": "key1","type": "textarea","input": true,// "defaultValue": defValuekey1Saved,description: "...."},{"label": "How do YOU define 2","spellcheck": true,"tableView": true,"validate": {"unique": false,"multiple": false},"key": "key2","type": "textarea","input": true,// "defaultValue": defValuekey2Saved,description: "...."},{"type": "button","label": "Save and Next","key": "submit","disableOnInvalid": true,"input": true,"tableView": false,"validate": {"unique": false,"multiple": false}}]};//returning the value used in the HTML templatepublicgetprojectFormContent():any {this.tempFormContent.defaultValue={'defValuekey1':defValuekey1Saved,'defValuekey2':defValuekey2Saved};// this neither works:// this.tempFormContent.defaultValues = {'defValuekey1':defValuekey1Saved, 'defValuekey2':defValuekey2Saved};returnthis.tempFormContent;
The text was updated successfully, but these errors were encountered:
sinisarudan
changed the title
[UNDOCUMENTED] setting the form default value
[UNDOCUMENTED? or NOT-SUPPORTED?] setting the form default value
Jun 24, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment
Hosting type
Formio.js version: - Version: 4.9.26
Frontend framework: Angular 8+
Browser: Chrome
Browser version: Version 83.0.4103.116 (Official Build) (64-bit)
Steps to Reproduce
Expected behavior
to support group (collective) setting
defaultValue
for the form values .as there is for the individual form component
defaultValue
setting`Observed behavior
nor
this.tempFormContent.defaultValues = formSavedData
worksIs this not documented or not supported?
Example
Individual setting to default value WORKS FINE:
BUT is there some group default setting, I've tried this, but NOT working:
The text was updated successfully, but these errors were encountered: