tvote.c: fix html form - vote - simple cgi voting system for web and gopher
(HTM) git clone git://src.adamsgaard.dk/vote
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit ae82a3af5bda85afefcbc4de1cee199c849f370b
(DIR) parent bb0bbb833f049070754af126b632cfa4aa9148e7
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sun, 27 Sep 2020 14:17:04 +0200
vote.c: fix html form
Diffstat:
M vote.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/vote.c b/vote.c
t@@ -206,19 +206,21 @@ list_polls()
void
print_poll_create_form()
{
- OUT("<form method=\"get\" action=\"/?create=1\">\n"
+ OUT("<form method=\"get\" action=\"\">\n"
+ "<input type=\"hidden\" name=\"create\" value=\"1\" />\n"
"<table class=\"create\" width=\"100%\" border=\"0\" "
"cellpadding=\"0\" cellspacing=\"0\">\n"
"<tr>\n"
" <td width=\"100%\" class=\"input\">\n"
- " <input type=\"text\" name=\"name\" value=\""
- " placeholder=\"name\" size=\"72\" autofocus=\"autofocus\" class=\"name\" />\n"
+ " <input type=\"text\" name=\"poll\" "
+ " placeholder=\"Name\" size=\"60\" "
+ " autofocus=\"autofocus\" class=\"name\" />\n"
" </td>\n"
"</tr>\n"
"<tr>\n"
" <td width=\"100%\" class=\"input\">\n"
- " <input type=\"text\" name=\"question\" value=\""
- " placeholder=\"Question\" size=\"72\" class=\"question\" />\n"
+ " <input type=\"text\" name=\"question\" "
+ " placeholder=\"Question\" size=\"60\" class=\"question\" />\n"
" </td>\n"
"</tr>\n"
"<tr>\n"