Hi Guys, i'm kind of stuck.
I created a module following the Holidays tutorial but i'm trying to have both admins and FEU edit the items.
Everything works well in the admin section but FEU submission returns errors.
It looks like the form is submitting elsewhere and can't find the parameters.
The url goes back to the original url (without variables) and here is the following error:
Warning: Parameter starting_price is not known by module BTG_AdmissionConsulting dropped in /home/xxxxx..../lib/classes/class.CMSModule.php on line 653
Thanks for the help
Front End to edit items
Re: Front End to edit items
Check: http://www.cmsmadesimple.org/APIDOC2_0/ ... odule.htmlmagallo wrote:It looks like the form is submitting elsewhere and can't find the parameters.
The url goes back to the original url (without variables) and here is the following error:
Warning: Parameter starting_price is not known by module BTG_AdmissionConsulting dropped in /home/xxxxx..../lib/classes/class.CMSModule.php on line 653
For security reasons there is a mechanism implemented in the CMSModule API to prevent unknown parameters to be accidentally handled by the modules: http://www.cmsmadesimple.org/APIDOC2_0/ ... nownParams
Code: Select all
RestrictUnknownParams(bool $flag = true)
Code: Select all
SetParameterType(string $param, \define $type)
If you look at the method InitializeFrontend() of the module you'll probably see some parameters already initialized and the $this->RestrictUnknownParams(); already called...
So you'll have to use $this->SetParameterType(...) for each frontend parameter you want your module to handle.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Front End to edit items
thanks @Jo Morg, that's exactly what I needed. I manually added all the parameters posted from the form including submit and cancel.Jo Morg wrote: So you'll have to use $this->SetParameterType(...) for each frontend parameter you want your module to handle.
I also implemented the pretty url settings as described in the guide.
I'm now facing some Upload file challenges, but will dig the form for some more info as I think I saw it somewhere.
Thanks again,.