0
FormHelper에 문제가 있습니다.FormHelper 이상한 입력 CakePhp
나는 내 첫 번째 모델 "게임"을 가졌습니다. 그것은 그런 모습입니다 :
class Game extends AppModel{
public $hasMany = array('gamesauthors','gameseditors','gamesillustrators','gamesgametypes');
public $hasAndBelongsToMany =
array("Author" =>
array('joinTable' => 'gamesauthors'),
"Editor" =>
array('joinTable' => 'gameseditors'),
"Illustrator" =>
array("joinTable" => 'gamesillustrators'),
"Gametype" =>
array('joinTable' => 'gamesgametypes'));
public $belongsTo = array('Collection','Distributor');
}
나는 "게임 타입은"그 코드와 체크 박스와 appared 만들려고 할 때 :
<?= $this->Form->input('gametypes', array("label" => "Type(s) de jeu:", 'option' => $types, 'multiple' => 'checkbox')); ?>
그것은 대신 체크 박스의 텍스트 형태의 ...
나는 정말로 이해하지 못한다. 유일하게 작동하지 않는 것입니다. 다른 모든 모델 (작성자, 편집자 ...)보다 옳습니다 ... 여러 번 이상 모든 코드를 검사했습니다. 그것은 정확히 다른 모델과 동일합니다 ...
더 많은 정보를 게시 할 수 있습니다 (var_dump, debug, anything!).
누군가가 아이디어를 가지고 있다면 ... 제발!
고마워
Nop는 ... 같은 문제가있다.이 사실을 이해할 수 없다. 다른 모든 필드는 정확히 동일한 코드를 가지고있다. 감사합니다. – Massprotect
컨트롤러에서 $ this- > set();? cont를 게시 할 수 있습니까? 롤러 코드를 지정하고 호출 할 함수를 지정하십시오. – user3363286
'code' public function edit ($ id = false) { $ collections = $ this-> Game-> Collection-> find ('list'); $ distributors = $ this-> Game-> Distributor-> find ('list'); $ authors = $ this-> Game-> Author-> find ('list'); $ editors = $ this-> Game-> Editor-> find ('list'); $ types = $ this-> Game-> Gametype-> find ('list'); $ illustrators = $ this-> 게임 -> 일러스트 레이터 -> 찾기 ('목록'); $ this-> 집합 (compact ('collections', 'distributors', 'authors', 'editors', 'types', 'illustrators')); 'code' 내 컨트롤러에 내 기능이 있습니다. – Massprotect