Quote:
Originally Posted by bananalive
This requires Easy Forms v3.3
Add this into postbit template somewhere (or postbit_legacy)
HTML Code:
<a href="misc.php?do=form&fid=2&username=$post[username]">Trade with $post[username]</a>
Import attached file.
form Hook: Form start
PHP Code:
$hiddenfield1 = $vbulletin->input->clean_gpc('g', 'username', TYPE_NOHTML); if (empty($hiddenfield1)) { $errormessage = "Error, this form needs a username."; eval('print_output("' . fetch_template('STANDARD_ERROR') . '");'); }
form Hook: Before Submit
PHP Code:
$hiddenfield1 = $vbulletin->input->clean_gpc('p', 'hiddenfield1', TYPE_NOHTML); $formoutput = str_replace('{param}', "$hiddenfield1", $formoutput);
Then you can use {param} in custom output.
if you don't want to use custom output then add a custom question with php code:
PHP Code:
$answer = '<input type="text" readonly="readonly" id="q_' . $formbit[id] . '" name="' . $formbit[id] . '" value="' . $hiddenfield1 . '" />';
|
I'm using this one my site but when a member tries to create the form with a username that contains opening characters such as the username #93forever they get an error...
"Error, this form needs a username."
Any idea how to fix this so that the system recognizes characters?