Form values not getting passed

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Form values not getting passed

Post by irish »

I have a small form on the action.default.php page.

Code: Select all

$smarty->assign('startform', $this->CreateFormStart($id, 'default', $returnid,'post'));
$smarty->assign('inputcontact', $this->CreateInputCheckbox($id,'contact','Y'));
$smarty->assign('submitbutton', $this->CreateInputSubmit($id, 'submit','Search'));
$smarty->assign('endform', $this->CreateFormEnd());
When I submit it, I get this:

Warning: Parameter contact is not known... dropped in D:\workspace\VDoherty\main\trocaire2.0\lib\misc.functions.php on line 1309

Warning: Parameter submit is not known... dropped in D:\workspace\VDoherty\main\trocaire2.0\lib\misc.functions.php on line 1309

The debug_display($params) on the default page is producing this:

Code: Select all

Number of elements: 2
Array
(
    [returnid] => 70
    [action] => test
)


and I done a print_r of _POST on the index.php and I'm getting this:

Code: Select all

Array
(
    [mact] => TakeAction,m8,test,0
    [hl] => en_GB
    [m8returnid] => 70
    [m8contact] => Y
    [m8submit] => Search
)
So as you can see the values from the form are getting picked up, but they are not getting passed into $params. I have forms on other pages without this problem. I can't see any difference between them.

Any insight?
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Form values not getting passed

Post by irish »

I'm getting really disappointed with the feedback on this forum  >:( . I love the product, I just started using it and I'm under pressure to rebuild an entire website with lots of functionality and an extreme short deadline. I'm building modules like a madman  :o I have hit a few snags along the way and posted them here, but I get very little replies.

Is it becuase CMSMS is not popular enough yet? If the creators of this software would shed some light on some of the questions here, it would help programmers like me to get a better understanding of the software so that we would then become diplomats for CMSMS.  ;)

Anyway, the Global Settings -> "Allow parameter checks to create warning messages:" was unchecked, so, I just commented out the trigger_error and continue in misc.functions.php. That took care of it, there doesn't seem to be any fall-out from doing that.  :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Form values not getting passed

Post by Dr.CSS »

Are you doing this in the backend or frontend are you using form builder?...

Some times a lack of info will get you ignored by the Developers, like what ver. of cmsms, what is it you are trying to do, is it a module you sre trying to build if so are you using a lang. file for it to read from, etc. etc....
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Form values not getting passed

Post by irish »

Thanks for the feedback, Mark.

I am using v1.3.

I was assuming that since we are in the Developers Discussion section that everybody in here are building their own modules or modifying existing modules. In my case, I am building my own modules.

The only thing I am trying to do is submit a form from the frontend. the form only has one checkbox in it, it did have more but I stripped everything out trying to find a solution to this issue. I am not using formbuilder, I am using cms_module, CreateFormStart, CreateInputCheckbox etc...

It should be a straightforward form submission, but for some reason I am getting those errors. The weird part about it is that I am not doing anything different here than I am doing in other self-built modules. 
Post Reply

Return to “Developers Discussion”