php - Creating Interactive Poll With Results Page -


i'm looking create poll/form allow user select starting 11 football game (or soccer if you're american), , submit , see image of popular team selection among fans (maybe popular each position instead of popular team selection together).

ideally form have options formation (4-4-2, 4-3-3, 4-5-1 etc) change layout/inputs on form (but not essential, nice touch - stick 4-4-2 otherwise).

my dream idea there dashboard on bottom had player profile pictures can dragged , dropped positions; having simple drop down boxes work (as long player cant used twice - stumbling block because don't want same player in both cb positions.)

design concept (results page same without bottom dashboard): quick design concept

i have absolutely no idea how approach way more complex have attempted in past. (forgot mention able reset results every week or if possible)

so if let me know if do-able, , if is, take me through how step step or mock 1 me appreciated.

thanks.

it doesn't have form.

here how it:

  1. create divs squares on field. assign each of them unique id e.g. id="square-1"

    and give them common class e.g class="field-square"

  2. create divs squares outside field. give them common class, , unique id each.

  3. when drop squares, have function extracts ids when dropped. post them php site jquery.post()

update

to extract ids, in callback (after have dropped square) this: square_id = square_id.replace('square-', '');

since you've not assigned number ids (which should, can change players in future getting them database), can ids using $(this).attr('id') in callback.

also http://api.jquery.com/jquery.post/


Comments

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

php - Calling a template part from a post -

How to mention the localhost in android -