[solved]$extra param for Form

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
rhamej
Forum Members
Forum Members
Posts: 33
Joined: Wed Jul 16, 2008 8:48 pm

[solved]$extra param for Form

Post 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.
Last edited by rhamej on Sat Sep 20, 2008 12:05 am, edited 1 time in total.
rhamej
Forum Members
Forum Members
Posts: 33
Joined: Wed Jul 16, 2008 8:48 pm

Re: [solved]$extra param for Form

Post 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

Code: Select all

"
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

Code: Select all

cms_htmlentities
Locked

Return to “[locked] Installation, Setup and Upgrade”