Log in

View Full Version : Forms


question?
10-29-2005, 01:22 PM
Hey, i want a form to submit the username in a hidden feild:
<font face='arial' size=2><b>All fields marked with a * are required:<br>
<form enctype='multipart/form-data' action='REMOVED' method='post'>
<table border=1 bordercolor='#000000'>
<table width='50%' border=0>
<tr><td> Name<font color='#ff0000'>*</font></td>
<td>
<input type="text" name="Name" size="20"></td></tr>
<tr><td> Comments<font color='#ff0000'>*</font></td>
<td>
<textarea name='Comments' rows=4 cols=31></textarea></td></tr>
<input type="hidden" name="forumname" value="$vbulletin->userinfo[username]">
</table>
</td></tr></table>
<input type='submit' value='Submit Form'> <input type=reset value='Clear Form'></form> Doesn't work. Any ideas?

Colin F
10-29-2005, 02:24 PM
Hey, i want a form to submit the username in a hidden feild:
<font face='arial' size=2><b>All fields marked with a * are required:<br>
<form enctype='multipart/form-data' action='REMOVED' method='post'>
<table border=1 bordercolor='#000000'>
<table width='50%' border=0>
<tr><td> Name<font color='#ff0000'>*</font></td>
<td>
<input type="text" name="Name" size="20"></td></tr>
<tr><td> Comments<font color='#ff0000'>*</font></td>
<td>
<textarea name='Comments' rows=4 cols=31></textarea></td></tr>
<input type="hidden" name="forumname" value="$vbulletin->userinfo[username]">
</table>
</td></tr></table>
<input type='submit' value='Submit Form'> <input type=reset value='Clear Form'></form> Doesn't work. Any ideas?

Try using $bbuserinfo[username] instead of $vbulletin->userinfo[username]

question?
10-29-2005, 02:30 PM
$bbuserinfo[username]
I was told that was for 3.0.9 :S

Is there anything i need to include etc?? Becuase that is the whole file, just the form, nothing else.

Guest190829
10-29-2005, 02:48 PM
Where are you putting this? In a template for a default vbulletin style or a new file?

question?
10-29-2005, 04:40 PM
Where are you putting this? In a template for a default vbulletin style or a new file?

In a new file to make into a vBadvanced module

if you get what i mean

question?
11-05-2005, 12:53 PM
bump

msgotit
11-05-2005, 05:09 PM
If it is in a .php file it should be $vbulletin->userinfo['username'], if it is in a template for a php file it should be $bbuserinfo[username]. This looks like you are using a template because you aren't saving it in a variable, hope that helps...