I created a form that expand and colapses the multiple selection buttons based on specific selection buttons:
![](https://static.wixstatic.com/media/a27d24_35831581e5bb4da682cfe2392d33bff8~mv2.png/v1/fill/w_914,h_238,al_c,q_85,enc_auto/a27d24_35831581e5bb4da682cfe2392d33bff8~mv2.png)
When the user logs the first time works well. Based on his choices of knowledge areas the choices open properlly:
![](https://static.wixstatic.com/media/a27d24_013b0fd37197432aa08bc99a4bfa321f~mv2.png/v1/fill/w_936,h_394,al_c,q_90,enc_auto/a27d24_013b0fd37197432aa08bc99a4bfa321f~mv2.png)
My problem is that when the user enters a second time in the form. I am not able to expand based on the information in the database. Looks like the fields that i am using are taking to much to be loaded and because of that the code understands that all options are not checked. My code bellow:
$w.onReady(function () {
let servico = $w("#checkbox1").checked
if(servico) {
$w("#group1").expand();
}
else {
$w("#group1").collapse();
}
let Estrategia = $w("#checkbox2").checked
if(Estrategia) {
$w("#group2").expand();
}
else {
$w("#group2").collapse();
}
let Financeiro = $w("#checkbox3").checked
if(Financeiro) {
$w("#group3").expand();
}
else {
$w("#group3").collapse();
}
etc ...
Can anybody help me with this issue???
Thanx!!!
Hi Yisrael,
I am using datasets. I dont have any codes for selection. The form is created by the users and updated by the same user, so the database has these permissions. Besides that is just a form connected with a database.
Thank you
How are you using the database? Are you using Datasets? Do you have code for the selections?
You'll need to provide more information for us to be able to help.