Problem to remove old state from Custom radio button

Hello, nice to meet all of you! Here is my question:

I created a survey.
Each question and answers are stored in DB and shown on the page thanks to a repeating group.
Each question has a choice of 4 answers that are custom made radio buttons.

I implemented that when a user answers to a question, the answer is directly saved in DB in case he loses internet connection or closes his page. So then when he reopens the page, the answer is still there.

My issue

Now if I answer to the question (“animal” in this case)

Then I reload my page, the correct answer selected is still displayed

But when I select a new answer (“fruit” in this case), the first selection still stays displayed in the front (in the DB the change is done correctly)

BTW I don’t have this issue if I load the survey for the first time,
Then select “animal”
Then select “fruit”
In this case it switches correctly. The problem happens only when I reload the page.

My question
Do you have a tip how to solve this point?

Thanks a lot in advance for your help

This topic was automatically closed after 70 days. New replies are no longer allowed.