jeudi 24 août 2017

Dynamic Checkboxes without Client Side Language

it's my goal to create a simple php form application that handles all the logic in the backend and displays the content via templates.

Specifically, I have to create a formular that displays checkboxes dynamically and without reloading.

E.g.

Checkbox 1 Checkbox 2 (hidden) Checkbox 3-5 (/hidden) Checkbox 6 etc.

I was asked to display the checkboxes 3-5 only if the Checkbox 2 has been selected, but right away without reloading. I easily solved the task using JQuery's hide() but I'm supposed to solve it with PHP in the backend. All I could think of would be a solution where I clear and add the values/definitions of the boxes upon form submit, but this is not allowed either.

Can you think of a way that doesn't require the form to be submitted?

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire