DAM!!...Scrap that last note:
Just been checking the DB and theres is nothing for the forms, and i
just thought whilst looking...i dont need to store the "Reciprocal
Link" i just need it to show up in the email....Now im really
confused...PLEASE HELP!!

Cheers Cricket for helping with this.



On Apr 19, 8:48 am, dvvbrook79 <[email protected]> wrote:
> Hi Cricket,
>
> HAHAHAHAH! i told you i was fairly new, im trying to come to terms
> with cakephp....AND I DIDNT create a DB column for "reciprocallink"
> LOL!...So is this all im missing, the DB column? and then it should
> work right yes?
>
> Thanks again for helping, much appreciated.
>
> On Apr 19, 12:36 am, cricket <[email protected]> wrote:
>
>
>
> > On Mon, Apr 18, 2011 at 4:14 AM, dvvbrook79
>
> > <[email protected]> wrote:
> > > Yeah ok sorry about that...heres my "submitlink.ctp" which is the
> > >emaili get. I have left the bottom part of the "controller" as i know
> > > this is for admin purposes....HOPE YOU CAN HELP,cause ive been looking
> > > and cant seem to find anything wrong, but saying that im still fairly
> > > new to cake....Cheers for the assistance.
>
> > > <p><a href="<?php echo $html->url(array('controller' => 'links',
> > > 'action' => 'submissions', 'admin' => true), true); ?>"><?php __('Link
> > > Submissions'); ?></a></p>
>
> > > <table>
> > >    <tr>
> > >        <td><?php __('Category'); ?>:</td>
> > >        <td><?php echo $link['LinkCategory']['title']; ?></td>
> > >    </tr>
> > >    <tr>
> > >        <td><?php __('Title'); ?>:</td>
> > >        <td><?php echo $link['Link']['title']; ?></td>
> > >    </tr>
> > >    <tr>
> > >        <td><?php __('URL'); ?>:</td>
> > >        <td><?php echo $html->link($link['Link']['url'], $link['Link']
> > > ['url']); ?></td>
> > >    </tr>
> > >    <tr>
> > >        <td><?php __('Description'); ?>:</td>
> > >        <td><?php echo $link['Link']['description']; ?></td>
> > >    </tr>
> > >            <tr>
> > >        <td><?php __('ReciprocalLink'); ?>:</td>
> > >        <td><?php echo $link['Link']['reciprocallink']; ?></td>
> > >    </tr>
> > > </table>
>
> > > "HERES MY view"
> > > <?php echo $form->create('Link', array('action' => 'submit')); ?>
>
> > >    <?php
> > >    echo $form->inputs(array (
> > >        'legend' => false,
> > >        'Link.link_category_id' => array (
> > >            'label' => __('Category', true)
> > >        ),
> > >        'Link.title',
> > >        'Link.url' => array(
> > >            'label' => __('URL', true)
> > >        ),
>
> > >        'Link.description',
> > >                'Link.reciprocallink'
>
> > >    ));
> > >    ?>
>
> > Have you checked the DB to see if 'reciprocallink' is empty? Try also
> > debugging the submitted data.
>
> > if (!empty($this->data))
> > {
> >   die(debug($this->data));
>
> > Actually, are you sure the DB column isn't named 'reciprocal_link'?
>
> > > "AND HERES MY controller"
> > > <?php
> > > class LinksController extends AppController {
>
> > >    var $name = 'Links';
> > >    var $uses = array('Link', 'LinkCategory', 'Page');
>
> > You don't need LinkCategory here because you can access it throughLink:
> > $this->Link->LinkCategory->find(...)
>
> > Better yet, put this in theLinkmodel:
>
> > public function getCategories($order = array())
> > {
> >         if (empty($order))
> >         {
> >                 $order = array('Linkcategory.title' => 'ASC');
> >         }
>
> >         return $this->LinkCategory->find(
> >                 'list',
> >                 array(
> >                         'order' => $order
> >                 )
> >         );
>
> > }
>
> > controller:
> > public function submit()
> > {
> >         if (!empty($this->data))
> >         {
> >                 // ...
> >         }
>
> >         $this->set(
> >                 'categories',
> >                 $this->Link->getCategories()
> >         );
>
> > }
>
> > You should fetch the categories after checking if $this->data is
> > empty. If thesubmissionsucceeds you redirect, so there's no need to
> > get the categories. If it fails, execution falls through, you get the
> > categories, and show the form again. But you should add an else to set
> > a flash message (but don't redirect) if save fails.
>
> > >                $this->Email->from     =
> > > __('DisneyVillaVacations.com', true) . ' <' .
> > > Configure::read('Admin.email') . '>';
> > >                $this->Email->to       =
> > > Configure::read('Admin.email');
> > >                $this->Email->subject  = __('DisneyVillaVacations.com
> > > -LinkSubmission', true);
>
> > $this->Email->from =
> > Configure::read('Email.from_name'). ' <' .
> > Configure::read('Admin.email') . '>';
> > $this->Email->to =
> > Configure::read('Admin.email');
> > $this->Email->subject = Configure::read('Email.subject');
>
> > bootstrap:
> > Configure::write('Email.from_name', 'DisneyVillaVacations.com');
> > Configure::write('Email.subject', 'DisneyVillaVacations.com');- Hide quoted 
> > text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to