Quote:
Originally Posted by Martyh
Thanks,
I'll give it a try. I didn't understand the " And then you could use form hooks or hidden fields to get variable." What do I need to do there? Appreciate all and any help.
|
How do I get parameter from url of form posted in custom output? (must have parameter)
1. Form Hook: Form Start
PHP Code:
$hiddenfield1 = $vbulletin->input->clean_gpc('g', 'param', TYPE_UINT);
if (empty($hiddenfield1))
{
$errormessage = "Error, this form needs a parameter.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}
2. Form Hook: Before Submit
PHP Code:
$hiddenfield1 = $vbulletin->input->clean_gpc('p', 'hiddenfield1', TYPE_UINT);
$formoutput = str_replace('{param}', "$hiddenfield1", $formoutput);
3. Use {param} in custom output.