Friday, March 22, 2013

Re: passing form inputs into controller

the problem is solved,... 
  $subject = $this->data['GroupMember']['subject'];
  $content = $this->data['GroupMember']['content'];

thanks 



On Friday, March 22, 2013 10:59:10 PM UTC-7, Chris wrote:
hi guys,... can anyone help please,... I working on group where group owner can send email to all members,... I can't pass form variables into a controller,... I'm getting error: 
Undefined index:  subject
Undefined index:  content

here is the code in  controller: 

            $subject = $this->data['subject'];
            $content = $this->data['content'];
 
and here is my form: 

<?php echo $this->Form->create(null, array('id'=>'FormId', 'url'=> array('controller'=>'group_members', 'action'=>'send/'. $group['Group']['id'])  )); ?> 

<?php  echo $this->Form->input('subject'); ?>
<?php echo $this->Form->input('content', array('rows' => '4')); ?>

<?php echo $this->Form->end('Send'); ?> 

how can I do this,...? 
thanks in advance, 
chris

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: