Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start with entire form expanded? #805

Closed
tonebender opened this issue Jan 8, 2018 · 6 comments
Closed

Start with entire form expanded? #805

tonebender opened this issue Jan 8, 2018 · 6 comments

Comments

@tonebender
Copy link

Sorry if this has been asked before -- I looked but couldn't find it.
When I create a form from a schema, and load it with some data (using startval), it initially only shows the fields that actually have data from the startval. I want it to show the whole form (the whole schema) including empty fields (regardless if they have default values or not). Is that possible?

@aceSkotheim
Copy link

Had this issue as well and found solution elsewhere. Use the line below to populate your data and show the entire form.
editor.root.setValue(data, true);

@danielo515
Copy link

Thank you very much @aceSkotheim , your solution works like a charm

@tonebender
Copy link
Author

Thanks!!!

@tonebender
Copy link
Author

Or actually, I take that back. :-|
It didn't really work. When I do for example:
editor.root.setValue(my_json_object_with_values, true);
it does not expand all the fields from the schema. It still only shows the properties that have data from the data object and I still need to click on Object Properties and check all the properties I want to view.

Can you explain more in detail how I should use editor.root.setValue(data, true) ?

Thanks!

@schmunk42
Copy link
Collaborator

This repo is no longer maintained (see also #800)

Development is continued at https://github.com/json-editor/json-editor

For details please visit json-editor/json-editor#5

@tonebender
Copy link
Author

Thanks for the heads-up!
I'll check it out and let this be.

btsimonh pushed a commit to btsimonh/json-editor that referenced this issue May 26, 2021
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants