• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Update a radio button group according to my databa

Update a radio button group according to my databa 1 year 1 day ago #42675

  • rgouyon
  • rgouyon's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
Hello

I am making an appointment form. My appointments are at a fixed day and time for every week of the year. For example Wednesday 18:00 18:30 19:00 Thursday 17:00 17:30
So I made a radio group with all the possibilities so the user as just to check the appointments he wants.
I my database I have the appointments already taken and I want to update the content of my radio group according to my database content.
for example for a given week if Wednesday 18:30 and Thursday 17:30 are already taken, I want to have my radio group looking like that:
Wednesday 18:00 18:30 19:00 Thursday 17:00 17:30

I have put buttons on my form to change the week (previous /next) and when the user click on one of these button it will call a javascript function to update my radio group

The problem is I don't know how to do so
Last Edit: 1 year 21 hours ago by rgouyon.
The administrator has disabled public write access.

Update a radio button group according to my databa 1 year 21 hours ago #42680

  • rgouyon
  • rgouyon's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
Ok I made some more reseach and I fount this topic ()https://www.rsjoomla.com/support/documentation/rsform-pro/frequently-asked-questions/dynamic-drop-down-change-form-example-.html

So I try to adapt it to my problem like this:
just for testing reason I set all my option to disabled
var hdispo = document.getElementById('avirer');
    var liste=['Mardi 18h00','Mardi 18h20','Mardi 18h40','Mardi 19h00','Mardi 19h20','Mardi 19h40','Jeudi 20h00','Jeudi 20h20','Jeudi 20h40','Jeudi 21h00','Jeudi 21h20';
 
    hdispo.options.length = 11;
    for(var i=0;i<11;i++){
      hdispo.options[i].text = liste[i];
      hdispo.options[i].value = i
      hdispo.options[i].enable=false;
    } 
but it seems it's not working
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!