The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add Checkboxes to Form
I am trying to add checkboxes to the free agent signup form in the vbTournaments mod. I have created the extra field in the database table and a single selection works without issue. The problem I have is that when multiple checkboxes are selected only the last selection is saved to the database instead of all of the choices.
tmnt_newfreeagent template: HTML Code:
<form class="vbform block" action="teams.php?do=addfreeagent" method="post"> <div class="blockbody formcontrols"> <div class="blockrow"> <label for="game">Game</label> <div style="overflow:auto"> <input type="checkbox" name="game[]" value="Aliens vs. Predator">Aliens vs. Predator<br /> <input type="checkbox" name="game[]" value="Chivalry: Medeival Warfare">Chivalry: Medeival Warfare<br /> <input type="checkbox" name="game[]" value="Counter-Strike: Global Offensive">Counter-Strike: Global Offensive<br /> <input type="checkbox" name="game[]" value="Insurgency">Insurgency<br /> </div> <p class="description">Please select the game(s) you play.</p> </div> </div> <div class="blockfoot actionbuttons"> <div class="group"> <input type="submit" class="button" value="{vb:rawphrase submit}" /> </div> </div> </form> PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|