{"id":20583741,"url":"https://github.com/mzur/kirby-uniform","last_synced_at":"2025-05-16T13:03:54.618Z","repository":{"id":23050460,"uuid":"26403607","full_name":"mzur/kirby-uniform","owner":"mzur","description":"A versatile Kirby plugin to handle web form actions.","archived":false,"fork":false,"pushed_at":"2024-05-13T13:05:18.000Z","size":818,"stargazers_count":254,"open_issues_count":8,"forks_count":39,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-02T06:13:01.708Z","etag":null,"topics":["form","kirby","kirby-plugin","php"],"latest_commit_sha":null,"homepage":"https://kirby-uniform.readthedocs.io","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/mzur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mzur","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"custom":"https://www.paypal.me/drmzur"}},"created_at":"2014-11-09T17:46:35.000Z","updated_at":"2025-03-04T22:54:47.000Z","dependencies_parsed_at":"2023-02-11T05:45:43.715Z","dependency_job_id":"4a52237b-d018-4377-875f-bb4328334e8e","html_url":"https://github.com/mzur/kirby-uniform","commit_stats":{"total_commits":353,"total_committers":35,"mean_commits":"10.085714285714285","dds":"0.23796033994334276","last_synced_commit":"bc8a6917f1b8c67ed7d437fff2324a05c219e68c"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzur%2Fkirby-uniform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzur%2Fkirby-uniform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzur%2Fkirby-uniform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzur%2Fkirby-uniform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mzur","download_url":"https://codeload.github.com/mzur/kirby-uniform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999859,"owners_count":21031046,"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":["form","kirby","kirby-plugin","php"],"created_at":"2024-11-16T06:43:32.288Z","updated_at":"2025-04-09T08:04:32.911Z","avatar_url":"https://github.com/mzur.png","language":"PHP","funding_links":["https://github.com/sponsors/mzur","https://www.paypal.me/drmzur","https://www.paypal.me/mzur/10eur"],"categories":[],"sub_categories":[],"readme":"# Kirby Uniform\n\nA versatile [Kirby](http://getkirby.com) plugin to handle web form actions.\n\n[![Documentation Status](https://readthedocs.org/projects/kirby-uniform/badge/?version=latest)](https://kirby-uniform.readthedocs.io/en/latest/?badge=latest) [![Tests](https://github.com/mzur/kirby-uniform/actions/workflows/php.yml/badge.svg)](https://github.com/mzur/kirby-uniform/actions/workflows/php.yml) ![Kirby \u003e=3](https://img.shields.io/badge/Kirby-%3E=3-green.svg)\n\nThis is Uniform for Kirby \u003e=3. You can find Uniform for Kirby 2 in the [kirby-2 branch](https://github.com/mzur/kirby-uniform/tree/kirby-2).\n\nBuiltin actions:\n\n- [Email](https://kirby-uniform.readthedocs.io/en/latest/actions/email/): Send the form data by email.\n- [EmailSelect](https://kirby-uniform.readthedocs.io/en/latest/actions/email-select/): Choose from multiple recipients to send the form data by email.\n- [Log](https://kirby-uniform.readthedocs.io/en/latest/actions/log/): Log the form data to a file.\n- [Login](https://kirby-uniform.readthedocs.io/en/latest/actions/login/): Log in to the Kirby frontend.\n- [SessionStore](https://kirby-uniform.readthedocs.io/en/latest/actions/session-store): Store the form in the user's session.\n- [Upload](https://kirby-uniform.readthedocs.io/en/latest/actions/upload): Handle file uploads.\n- [Webhook](https://kirby-uniform.readthedocs.io/en/latest/actions/webhook/): Send the form data as an HTTP request to a webhook.\n\n## Quick example\n\nController:\n\n```php\n\u003c?php\n\nuse Uniform\\Form;\n\nreturn function ($kirby) {\n   $form = new Form([\n      'email' =\u003e [\n         'rules' =\u003e ['required', 'email'],\n         'message' =\u003e 'Email is required',\n      ],\n      'message' =\u003e [],\n   ]);\n\n   if ($kirby-\u003erequest()-\u003eis('POST')) {\n      $form-\u003eemailAction([\n         'to' =\u003e 'me@example.com',\n         'from' =\u003e 'info@example.com',\n      ])-\u003edone();\n   }\n\n   return compact('form');\n};\n```\n\nTemplate:\n\n```html+php\n\u003cform action=\"\u003c?php echo $page-\u003eurl() ?\u003e\" method=\"POST\"\u003e\n   \u003cinput name=\"email\" type=\"email\" value=\"\u003c?php echo $form-\u003eold('email'); ?\u003e\"\u003e\n   \u003ctextarea name=\"message\"\u003e\u003c?php echo $form-\u003eold('message'); ?\u003e\u003c/textarea\u003e\n   \u003c?php echo csrf_field(); ?\u003e\n   \u003c?php echo honeypot_field(); ?\u003e\n   \u003cinput type=\"submit\" value=\"Submit\"\u003e\n\u003c/form\u003e\n\u003c?php if ($form-\u003esuccess()): ?\u003e\n   Success!\n\u003c?php else: ?\u003e\n   \u003c?php snippet('uniform/errors', ['form' =\u003e $form]); ?\u003e\n\u003c?php endif; ?\u003e\n```\n\n## Installation\n\nInstall Uniform via Composer: `composer require mzur/kirby-uniform`\n\nOr [download](https://github.com/mzur/kirby-uniform/archive/master.zip) the repository and extract it to `site/plugins/uniform`.\n\n## Setup\n\nAdd this to your CSS:\n\n```css\n.uniform__potty {\n    position: absolute;\n    left: -9999px;\n}\n```\n\n**Note:** [Disable the Kirby cache](https://getkirby.com/docs/guide/cache) for pages where you use Uniform to make sure the form is generated dynamically.\n\n## Documentation\n\nFor the full documentation head over to [Read the Docs](https://kirby-uniform.readthedocs.io).\n\n## Questions\n\nSee the [answers](https://kirby-uniform.readthedocs.io/en/latest/answers/) in the docs, [post an issue](https://github.com/mzur/kirby-uniform/issues) if you think it is a bug or create a topic in [the forum](https://forum.getkirby.com/) if you need help.\n\n## Contributing\n\nContributions are always welcome!\n\n## Donations\n\nSince some people insist on sending me money for this (free) plugin you can do this [here](https://www.paypal.me/mzur/10eur).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmzur%2Fkirby-uniform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmzur%2Fkirby-uniform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmzur%2Fkirby-uniform/lists"}