Page 1 of 1
[solved]$extra param for Form
Posted: Fri Sep 19, 2008 5:26 pm
by rhamej
Why does this not work?
Code: Select all
$this->CreateFormStart($id, 'add_event', $returnid, $method='post', $enctype='', $extra='whoa')
The form is not adding anything I define for $extra.
Re: [solved]$extra param for Form
Posted: Sat Sep 20, 2008 12:11 am
by rhamej
Ok, I just had the syntax wrong. Here it is correct for anyone interested
Code: Select all
$this->CreateFormStart($id, 'add_event', $returnid, $method='post', $enctype='', false, $idsuffix, $params, $extra='onsubmit="return validate_form(this)"') .
Also, and I'm not sure why this was done. But the $extra is defined with cms_htmlentities. Which means when the quotes were getting parsed, the browser was showing them as
To fix this, open up lib/classes/module_support/modform.inc.php and find this on line 43.
Code: Select all
$extra = cms_htmlentities($extra);
And delete