D
D
Dooeste2020-10-09 14:57:13
Java
Dooeste, 2020-10-09 14:57:13

How to implement dependent checkboxes based on relationships from the database?

I have an Entity Option stored in a database. Options can be dependent on each other or exclude each other. Dependencies are also stored in the database, they are Set. I need to implement a Checkbox that, based on these dependencies, will disable or vice versa highlight the rest of the options.
5f804fbe84fc5122470655.jpeg
5f804fd83252c688596128.jpeg
5f804ff921160094990562.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tendor, 2020-10-09
@Tendor

Conditionally make an array where the key is an option and the knowledge is an array of available options.
Place for each option in the attribute a list of available options.
When switching options, disable everything except those available for that option. Data about available options is taken from the attribute.
Must be validated on the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question