I need to pass an id to a modal popup.... the modal is then used to fill in a form.
Here is my code for calling the modal...(the echo below is in a loop which should give each a differing data-id
echo '<a class="sign-up" href="#" data-reveal-id="modal-tournament" data-reveal data-id= "<? echo $tournament_id;?>" >SIGN UP</a>'; The tournament_id is then needed to be passed as a hidden field in the form below.
And this is my modal and form
<div id="modal-tournament" class="reveal-modal" data-reveal> <h3>Sign up to Tournament</h3> <p>To sign your team up to take part in this tournament, enter you team name, username and email address and click</p> <p></p> <form enctype="text/plain" method="get" action="#"> <p>Team Name: <input type="text" name="team_name"></p> <p>Username: <input type="text" name="username"></p> <p>Email: <input type="email" name="email"></p> <input type="hidden" name="tournament_id" value="XXXXXXX"> <input type="submit" value="Join"> </form> <a class="close-reveal-modal">×</a> </div> Any ideas how I can achieve this.. I am at a bit of a loss...
Thanks