Quote:
Originally Posted by Martyh
Hi BananaLive,
( Or anyone that can help.)
When I submit the form below ( your example ) to a HTML page , it directs me to a page of smileys located here
http://localhost/forum/misc.php?user=bob
It seems to cut off the "do=form&fid=1" part but does add the "user=bob" part"
I'm kinda stuck on that one.
.
<form name="form" action="http://localhost/forum/misc.php?do=form&fid=1" method="get">
Username:
<input type="text" name="user" />
<input type="submit" value="Submit" />
</form>
Another question on this one.
Do I need to change anything in these codes to be able to use the form on the top of the page ?
When you say "use {param} in custom output" I really don't know what that means could someone explain that in a little more detail please ? . Sorry for my inexperience I am willing to pay/donate (to you or to your favorite charity), to anyone who can help me out with this.
Thanks,
|
HTML Code:
<form name="form" action="misc.php" method="get">
<input type="hidden" name="do" value="form" />
<input type="hidden" name="fid" value="1" />
Username:
<input type="text" name="user" />
<input type="submit" value="Submit" />
</form>
PHP Code:
$hiddenfield1 = $vbulletin->input->clean_gpc('g', 'user', TYPE_NOHTML);
if (empty($hiddenfield1))
{
$errormessage = "Error, this form needs a username.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}
Custom output enables you to design your own layout using the parts of the form.
PHP Code:
$hiddenfield1 = $vbulletin->input->clean_gpc('p', 'hiddenfield1', TYPE_NOHTML);
$formoutput = str_replace('{param}', "$hiddenfield1", $formoutput);
The alternative would be to use this code: (it justs adds the field like another question at the end of the form output)
PHP Code:
$formoutput .= $form[preq] . "Username" . $form[pstq];
$formoutput .= $form['prea'] . $hiddenfield1 . $form[psta];