Custom form posting Array rather than user input values
pWe are using the Aheadworks Helpdesk Module and are trying to create a
second form to capture specific information and use the form to create a
ticket where all of the form content gets posted to the content section of
Helpdesk./p pThe problem is, if I use the name=content, what gets posted
into the content section is simply Array/p pI have tried using
name=content[] but it also returned Array/p pThe module looks to be using
this post method:/p precodepublic function newAction() { if
(!$this-gt;_getCustomerSession()-gt;getCustomerId()) {
$this-gt;_getCustomerSession()-gt;authenticate($this); return; } $session
= Mage::getSingleton('core/session'); $customer =
$this-gt;_getCustomerSession()-gt;getCustomer(); $Proto =
Mage::getModel('helpdeskultimate/proto'); $postData =
$this-gt;getRequest()-gt;getPost(); if (isset($postData['department_id']))
{ $Proto-gt;setDepartmentId($postData['department_id']); } try { $Proto
-gt;setSubject(@$postData['title']) -gt;setContent(@$postData['content'])
-gt;setPriority(@$postData['priority'])
-gt;setStoreId(Mage::app()-gt;getStore()-gt;getId())
-gt;setFrom(Mage::getSingleton('customer/customer')-gt;getId())
-gt;setSource('web'); /code/pre pI am not sure how to actually transform
the @$postData['content'] into a foreach statement, or similar. Any help
would be greatly appreciated! /p
No comments:
Post a Comment