Is there any plugins like Rails Gem Cocoon for CakePHP?
I am really interested in building a plugin like this or contribute to one that already exists. So here are some questions about the plugin:
How difficult would it be to develop a plugin like that?
Cocoon automatically handles HasMany and HABTM forms. The functioning process goes like this:
Suppose you’re developing a project manager and a ProjectHasManyIssues
You load the gem (and its assets).
When you are writing the form for a new Project if you write a input for Issues the Cocoon gem will proxy the call of Rails form builder and will create inputs for Issues with all the fields of the model (e.g. IssueName, IssuePriority, IssueReporter) and also will create an “+” button to add new issues and a “-” button in each issue to remove it (yes, it is that magical).
Since the input names are in the format that the controller expect them to be the data is saved without any problem and even is validated.
The final look of it is something like this (in this case an Article HasMany References):