Skip to content

Instantly share code, notes, and snippets.

@veganista
Created February 10, 2011 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veganista/821459 to your computer and use it in GitHub Desktop.
Save veganista/821459 to your computer and use it in GitHub Desktop.
$this->loadModel('RoundLength');
$this->set('round_lengths', $this->RoundLength->find('list'));
var $hasMany = array(
'Round' => array(
'className' => 'Round',
'foreignKey' => 'round_length_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
var $belongsTo = array(
'RoundLength' => array(
'className' => 'RoundLength',
'foreignKey' => 'round_length_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
<?php
//debug($round_lengths); //this debug shows an array of my round lengths
$session->flash();
echo $this->Form->create('Round', array('action' => 'add'), array('class' => 'mini-form'));
echo $this->Form->input('round_length_id'); //this keeps coming up as an empty select list
echo $this->Form->end('Start Round');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment