02-28-2009, 03:43 PM
|
|
|
Join Date: Oct 2007
Location: UK
Posts: 2,802
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by dknelson
WOW...I sure hope so. I thought I would go ahead and just create 60 something forms but they have custom output so I just realized that I can't just cut and past the custom output because the question numbers are different for each one, even though they are the same questions.
|
- Create custom question
- php code:
PHP Code:
$answer = '<select name="'.$formbit[id].'">'; $answer .= '<option></option>'; $thisanswer = $q[$formbit[id]]; $threads = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "thread WHERE forumid = '10' ORDER BY title ASC"); while($row = $db->fetch_array($threads)) { $answer .= '<option value="'.$row[threadid].'"'; if ($row[threadid] == $thisanswer) { $answer .= 'selected="selected"'; } $answer .= '>'.htmlspecialchars($row[title]).'</option>'; } $answer .= '</select>';
- Replace 10 with appropriate forumid
- Edit Form Hook: Before Submit
PHP Code:
$form['threadid'] = $q[1];
- Replace 1 with appropriate question hash
|