{"id":16182584,"url":"https://github.com/bancer/form-builder","last_synced_at":"2025-04-07T12:31:28.874Z","repository":{"id":62491497,"uuid":"416888921","full_name":"bancer/form-builder","owner":"bancer","description":"This package is a wrapper for CakePHP FormHelper and provides the fluent interface (methods chaining) to build HTML form elements.","archived":false,"fork":false,"pushed_at":"2021-10-19T20:01:12.000Z","size":161,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T15:18:27.304Z","etag":null,"topics":["cakephp","fluent-interface","form-builder","forms","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bancer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-13T20:29:12.000Z","updated_at":"2021-11-02T16:01:11.000Z","dependencies_parsed_at":"2022-11-02T11:15:58.545Z","dependency_job_id":null,"html_url":"https://github.com/bancer/form-builder","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bancer%2Fform-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bancer%2Fform-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bancer%2Fform-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bancer%2Fform-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bancer","download_url":"https://codeload.github.com/bancer/form-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247652946,"owners_count":20973720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cakephp","fluent-interface","form-builder","forms","php"],"created_at":"2024-10-10T06:34:23.666Z","updated_at":"2025-04-07T12:31:28.854Z","avatar_url":"https://github.com/bancer.png","language":"PHP","readme":"# form-builder (for CakePHP)\n\nThis package is a wrapper for CakePHP FormHelper. Compatible with CakePHP 3.x and 4.x.\n\n## How to install\nExecute `composer require bancer/form-builder` or `composer require bancer/form-builder --update-no-dev` to install by composer.\n\n## Why and when to use\nUse this package if you would like to get a different interface for constructing HTML forms than provided by CakePHP's FormHelper class. This package wraps FormHelper class and provides builder methods instead of FormHelper method options. It does not change the behavior of FormHelper. In addition it provides methods for some common HTML element attributes. It is expected to make the construction of forms easier and less error prone due to fewer number of magic strings necessary to build form elements. An extra benefit is code autocompletion in any IDE or editor that supports autocompletion of PHP code. \n\n## How to use\nExample in the view file:\n``` php\nuse Bancer\\FormBuilder\\FormBuilder;\n...\n$FormBuilder = new FormBuilder($this-\u003eForm); // where $this-\u003eForm is an instance of FormHelper\n$FormBuilder-\u003enewForm($user)\n    -\u003emethod('post')\n    -\u003eurl(['controller' =\u003e 'users', 'action' =\u003e 'edit'])\n    -\u003eencoding('UTF-8')\n    -\u003eid('edit-user')\n    -\u003eclasses('narrow-form');\necho $FormBuilder-\u003enewControl('User.email')\n    -\u003elabel(__('Email'))\n    -\u003ereadOnly()\n    -\u003esize(50)\n    -\u003eattribute('data-validated', 1)\n    -\u003eattribute('oninvalid', 'alert('Invalid email')');\necho $FormBuilder-\u003enewControl('User.password')\n    -\u003elabel(__('Password'))\n    -\u003etype('password')\n    -\u003esize(30)\n    -\u003eminLength(8)\n    -\u003emaxLength(30)\n    -\u003erequired(false);\necho $FormBuilder-\u003enewSubmit(__('Submit'));\necho $FormBuilder-\u003eend();\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbancer%2Fform-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbancer%2Fform-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbancer%2Fform-builder/lists"}