Search code examples
scaffolding

Can I possibly modify scaffold in CakePHP so that it won't display all the fields in my table?


Scaffolding works like magic. However, there are fields in my table that does necessarily needed to be edited. How can I customize $scaffold so that I won't manually create the view for editing my table. Thanks guys.


Solution

  • From the CakePHP manual on scaffolding:

    [Scaffolding is] a loose structure you throw up real quick during the beginning of a project in order to get started. It isn’t meant to be completely flexible, it’s meant as a temporary way to get up and going. If you find yourself really wanting to customize your logic and your views, it’s time to pull your scaffolding down in order to write some code.

    What you can do is use cake bake on the command line to create basic views, and then you can modify them to your specific needs.