I personally find the best way is still using the html / form helpers,
but to use a model or field name that doesn't exist. Of course, if
you want the value to persist then you'll need to store the value
somewhere - perhaps in the session.
ie, in your controller:
function edit($id = null) {
if(empty($this->data)) {
...
$this->data['Display']['currency'] = $this->Session-
>read('Display.currency');
} else {
$this->cleanUpFields();
// save the currency they selected back to the session
$this->Session->write('Display.currency', $this->data['Display']
['currency']);
...
}
}
and your view can just use
echo $html->checkbox( 'Display/currency' );
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---