mardi 12 janvier 2016

Only one of two radiobutton/checkboxes/buttons must be clicked, Laravel 5.2

I need to add a radiobutton / checkbox / regular button / toggle / switch / slider... (don't really have a preference) to a Laravel 5.2 form. When I try radiobuttons I can select them both at the same time (not good) and I can not uncheck them (also not good).

  1. The user HAS TO select one or the other.

  2. Also ONLY ONE of the two choices can be selected.

Example:
In a 'start new tournament-form' the user has to choose a type: table tournament or poule tournament. Only one of the two can be chosen. When the user checks option 1, option 2 (if previously checked) will be unselected, and vice versa.

How would I achieve this? If possible pure PHP/Laravel, if not jQuery is my preference to work with.




Aucun commentaire:

Enregistrer un commentaire