CAKEPHP Пішін көмекшісімен жұмыс істеу үшін контроллерге бұл $> -> деректерді орнату керек пе?

I would like to set $this->data in a view rather than the controller. Will this work with the form helper to automagically input values?

көп рақмет!

Further explanation if you really want to know... You may wonder why I wouldn't just put the values right into the value field but it makes sense in this situation to put it into $this->data; I have a ton of fields of various types and I do not want to have to add if isset() to every value field because form fields are generated based on a stored value and may or may not have already been filled in. I cannot set this->data in the controller because of the data being in JSON. Plus the data has to go through several layers before getting to where it is at this point.

0

1 жауаптар

шешілмеген, бірақ бәрін қолмен енгізу арқылы айналдырдым. Оны автоматтық түрде қосу жақсы болар еді.

0
қосылды