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

Generate form with collapsible pannel #144

Open
raghucsjm opened this issue Apr 28, 2022 · 2 comments
Open

Generate form with collapsible pannel #144

raghucsjm opened this issue Apr 28, 2022 · 2 comments

Comments

@raghucsjm
Copy link

I have a json file which contains different data, which is logically separated , so I need to group them in collapsible pannel.
Is there any solution for this.

And One more thing is that, can we create html with use defined id.

@peeyush12345
Copy link

<style> .collapsible { background-color: #f9f9f9; color: #444; cursor: pointer; padding: 18px; width: 100%; border: none; text-align: left; outline: none; font-size: 15px; transition: 0.4s; }
.active {
  background-color: #ccc;
}

.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #f9f9f9;
}
</style>
Group 1

Content of Group 1

Group 2

Content of Group 2

<script> var coll = document.getElementsByClassName("collapsible"); var i; for (i = 0; i < coll.length; i++) { coll[i].addEventListener("click", function() { this.classList.toggle("active"); var content = this.nextElementSibling; if (content.style.display === "block") { content.style.display = "none"; } else { content.style.display = "block"; } }); } </script>

@peeyush12345
Copy link

<style> /* Hide the default checkbox */ input[type="checkbox"] { appearance: none; -webkit-appearance: none; -moz-appearance: none; width: 16px; height: 16px; border: 1px solid #ccc; outline: none; transition: all 0.3s; }
/* Create custom checkbox design */
input[type="checkbox"]:before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: #fff;
  border: 1px solid #ccc;
  transition: all 0.3s;
}

/* Apply custom checkbox style when checked */
input[type="checkbox"]:checked:before {
  background-color: #007bff;
}
</style> Option 1
Option 2
Option 3

saicheck2233 pushed a commit to saicheck2233/json-forms that referenced this issue Jul 2, 2023
saicheck2233 added a commit to saicheck2233/json-forms that referenced this issue Jul 11, 2023
Issue#130 and brutusin#144: Add collapsible form support
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

2 participants