{"id":27265885,"url":"https://github.com/sgtlambda/fieldwork","last_synced_at":"2025-04-11T08:39:24.517Z","repository":{"id":19591315,"uuid":"22841734","full_name":"sgtlambda/fieldwork","owner":"sgtlambda","description":"DEPRECATED","archived":false,"fork":false,"pushed_at":"2021-10-03T17:15:12.000Z","size":620,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-09T20:57:38.465Z","etag":null,"topics":[],"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/sgtlambda.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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":"2014-08-11T14:23:26.000Z","updated_at":"2024-04-25T09:09:51.000Z","dependencies_parsed_at":"2022-08-24T13:56:21.020Z","dependency_job_id":null,"html_url":"https://github.com/sgtlambda/fieldwork","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Ffieldwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Ffieldwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Ffieldwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgtlambda%2Ffieldwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgtlambda","download_url":"https://codeload.github.com/sgtlambda/fieldwork/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248362226,"owners_count":21091072,"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":[],"created_at":"2025-04-11T08:39:23.999Z","updated_at":"2025-04-11T08:39:24.469Z","avatar_url":"https://github.com/sgtlambda.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"fieldwork\n===========\n**Web forms for cool people**\n\n[![Build Status][travis-image]][travis-url]\n[![Code Quality][scrutinizer-g-image]][scrutinizer-g-url]\n[![Code Coverage][coveralls-image]][coveralls-url]\n\nfieldwork will make your life easier by dealing with the trivial tasks of building web forms such as markup generation, validation and sanitization.\n\n - Define entire forms using **PHP only**. All HTML and JavaScript code will be generated for you.\n - Sanitizes and validates **client-side for convenience + performance** and **server-side for security**.\n\n### Creating a simple form\n\n```php\nuse fieldwork\\Form;\nuse fieldwork\\components\\TextField;\nuse fieldwork\\components\\Button;\nuse fieldwork\\validators\\EmailFieldValidator;\n\n// Instantiate a new form\n$contactForm = new Form('contactform');\n\n// Add a text field with validation\n$emailField = new TextField('email', 'Email address');\n$emailField\n   -\u003eaddValidator(new EmailFieldValidator())\n   -\u003eaddTo($contactForm);\n\n// Add a submit button\n$submitButton = new Button('submit', 'Send', 'submit', Button::TYPE_SUBMIT);\n$submitButton\n   -\u003eaddTo($contactForm);\n\n// Process the form\n$contactForm-\u003eprocess();\n\nif($contactForm-\u003eisSubmitted())\n    echo 'Your email address is ' . $contactForm-\u003ev('email');\nelse\n    echo $contactForm-\u003egetHTML();\n```\n\n#### TODO\n\n - Error message i18n\n - Tighter AJAX integration / API\n - Complete test coverage\n \n#### HEAD\n\n - Moved the front-end assets into a separate repo\n - Added NumberSanitizer\n - Added materialize.css compatible markup generation\n - Fixed some bugs\n\n[travis-image]: https://img.shields.io/travis/jmversteeg/fieldwork.svg?style=flat-square\n[travis-url]: https://travis-ci.org/jmversteeg/fieldwork\n\n[scrutinizer-g-image]: https://img.shields.io/scrutinizer/g/jmversteeg/fieldwork.svg?style=flat-square\n[scrutinizer-g-url]: https://scrutinizer-ci.com/g/jmversteeg/fieldwork/\n\n[coveralls-image]: https://img.shields.io/coveralls/jmversteeg/fieldwork.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/jmversteeg/fieldwork","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgtlambda%2Ffieldwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgtlambda%2Ffieldwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgtlambda%2Ffieldwork/lists"}