Verified:

DruncK Game profile

Member
2134

Apr 14th 2015, 23:53:25

Might be a cool function and I'm guessing not a lot of work involved.

qzjul Game profile

Administrator
Game Development
10,264

Apr 15th 2015, 14:23:24

Write me the html for an embedded poll, and it will be yours much quicker! :)
Finally did the signature thing.

Celphi Game profile

Member
EE Patron
6349

Apr 15th 2015, 23:51:58

I'll make the code if you make the question and choices. :)
Resistance is futile. You will be assimilated.

enshula Game profile

Member
EE Patron
2510

Apr 16th 2015, 6:43:22

the idea would be people could create a poll, which would either be at the top of the thread or below the first post or in the first post

and choose the question and how many choices

id assume theres modules you could just repurpose

Celphi Game profile

Member
EE Patron
6349

Apr 16th 2015, 10:26:10

**Under Construction**
** save as celphi.php

<html>

// creates text box and create poll button
<form method="POST" name="pollbox" action="celphi2.php>
<p>Enter Poll Question:</p>
<input type="text" name="poll_Q">
<p>Select # of Questions:</p>
<input type="submit" value="Create Poll">
</form>

<?php

// creates drop box with #s 1-5 (which allows user to create up to 5 answers)
echo "
echo "<select name=\"ans\">";
for ($ans=1; $ans<=5; $ans++) {
echo "<option value=\"$ans\">$ans</option>\n";
}
echo "</select>";

?>
</html>
==================================================================================
*** celphi2.php
<html>
<?php

// grabs # of answers from dropbox from celphi.php
$ans = $_POST["ans"];

// creates textboxes for answers equal to number selected in drop box
echo '<form method="POST" name="dropbox2">';
For ($c=0; $c < $ans; $c++) {
echo '<input type="text" name=$choice[$c]>' . '<br>';
}
echo '</form>';

// create radio buttons equal to the # selected in dropbox
For ($c = 0; $c < $ans; $c++) {
echo '<input type="radio" name="ans[$c]" value="ans[$c]">' . $choice;
}
?>


</html>

*********
I haven't tested it because I'm just blindly typing it into this box, but that's your HTML portion using some PHP to populate combo box and textboxes. The only part missing is the recording the results to file and retrieving which i'm not sure if you'll be saving to MYSQL or to disk.
*********

Edited By: Celphi on Apr 16th 2015, 11:09:45. Reason: [ Irrelevant ]
Resistance is futile. You will be assimilated.

qzjul Game profile

Administrator
Game Development
10,264

Apr 16th 2015, 17:31:42

the code i have no problem with making, i mostly need something that looks good and is mobile friendly that works in this forum layout :) make a mockup perhaps? :)
Finally did the signature thing.

Celphi Game profile

Member
EE Patron
6349

Apr 16th 2015, 17:33:16

...... "Write me the html for an embedded poll, and it will be yours much quicker! :) "

Edited By: Celphi on Apr 16th 2015, 17:37:37. Reason: [ Irrelevant ]
Resistance is futile. You will be assimilated.

Celphi Game profile

Member
EE Patron
6349

Apr 16th 2015, 21:07:56

On a side note: Qzjul has been very helpful with my questions with php. Thnx Qz.
Resistance is futile. You will be assimilated.

qzjul Game profile

Administrator
Game Development
10,264

Apr 16th 2015, 21:51:54

np :)
Finally did the signature thing.

Xninja Game profile

Member
1222

Apr 18th 2015, 9:06:39

The Mars2025 forum allows use of user made polls, could always check that out as a reference/template. It looks the same mobile or desktop also.
Overlord of Chaos
http://lords.ghqnet.com<--CLICK ME; JOIN CHAOS
Aim:baerninja
MSN/Email:
ICQ:463960159