please ignore this line this have been copied wrong "<? foreach ('$ $ Checkboxen als Checkbox'):"
2010/6/30 Davor Ilic <webfacer@gmail.com>Model:
<?php
class Product extends AppModel {
var $name = 'Product';
var $primaryKey = 'product_id';
#var $hasOne = array('Kattaxonomie');
}
?>
CTP:
<h1>Add Product</h1>
<?php
echo $form->create('Product');
echo $form->input('product_articlenum', array('type' => 'hidden', 'value' => ($last_proarticle['Product']['product_articlenum']+1)));
?>
<? foreach($checkboxes as $checkbox) :
$value = $checkbox['Kat']['kat_id'];
$label = $checkbox['Kat']['kat_name'];
$options[$value] = $label;
endforeach; ?>
<?=$form->input('Kat.kat_id', array('type' => 'select', 'multiple'=>'checkbox', 'options'=> $options, 'label'=>'')); ?>
<?
echo $form->input('product_name');
echo $form->input('product_location');
echo $form->input('product_price');
echo $form->input('product_color');
echo $form->input('product_date',array('type'=>'hidden', 'value'=>date('Y-m-d h:i:s')));
echo $form->input('product_descr');
echo $form->end('Add Product');
?>
2010/6/30 Zaky Katalan-Ezra <procsharp@gmail.com>
Check that id in ctp have no disable=>disable.
Otherwise you have a typo someware.
Write you model action and ctp
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment