I forgot to add my code.
--------------------------------------------------------------------------------------------------------------------------------
my controller: the send() is for my email on contact form and the
captcha() and add() are from the component.
Obviously Im trying to get captcha to validate to allow email send.
--------------------------------------------------------------------------------------------------------------------------------
function send() {
$this->Contact->set($this->data);
$this->Email->template = 'email/contact'; // this will use
contact_html.ctp
$this->Email->from = $this->data['Contact']['Email'];
$this->Email->fromName = 'Web Inquiry';
$this->Email->to = '[email protected]';
//$this->Email->cc = '[email protected]';
$this->Email->subject = 'Network Fintess - Contact Request';
$result = $this->Email->send();
$this->redirect('thankyou');
exit();
}// end send()
function captcha() {
$this->Captcha->show();
}// end captcha()
function add() {
if (!empty($this->data) && $this->Captcha->protect()) {
$this->ModelName->save($this->data);
}
}// end add()
-------------------------------------------------------------------------------------------------------------------------
my form: the action is going to send. I believe this may be problem
because as some point on submit it
needs to check captcha but Im just not getting how to tie it all
together.
-------------------------------------------------------------------------------------------------------------------------
<?php echo $form->create(array('class' => 'contact', 'type' =>
'post', 'action' => 'send')); ?>
<fieldset>
<h5>Contact Info</h5>
<ul class="form">
<li>
<?php echo $form->label('Name:'); ?>
<?php echo $form->input('Name', array('div' => false,
'label' => false, 'class' => 'required')); ?>
</li>
<li>
<?php echo $form->label('Email:'); ?>
<?php echo $form->input('Email', array('div' => false,
'label' => false, 'class' => 'required email')); ?>
</li>
<li>
<?php echo $form->label('Phone:'); ?>
<?php echo $form->input('Phone', array('div' => false,
'label' => false)); ?>
</li>
</ul>
<h5>Message</h5>
<ul class="form">
<li class="text-area"><?php echo $form->textarea
('details', array('class' => 'required')); ?></li>
</ul>
<br />
<ul class="form">
<li>
<?php echo $captcha->input(); ?>
</li>
</ul>
<div style="clear:both;"></div>
<br />
<br />
<ul class="form">
<li>
<?php echo $form->submit('Send Message'); ?>
</li>
</ul>
</fieldset>
<?php echo $form->end(); ?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---