{"id":16272573,"url":"https://github.com/gnat/simple-php-form","last_synced_at":"2025-03-19T23:31:08.500Z","repository":{"id":62511456,"uuid":"10804350","full_name":"gnat/simple-php-form","owner":"gnat","description":":memo: Easily create and validate HTML forms in PHP 8.","archived":false,"fork":false,"pushed_at":"2023-06-27T19:44:07.000Z","size":100,"stargazers_count":28,"open_issues_count":1,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-28T21:48:16.558Z","etag":null,"topics":["form","forms","php","php-form","php8","validation"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2013-06-19T19:32:01.000Z","updated_at":"2025-01-06T14:25:57.000Z","dependencies_parsed_at":"2024-10-27T21:39:26.532Z","dependency_job_id":"d9fb5068-de21-4630-a3ca-409e38b11678","html_url":"https://github.com/gnat/simple-php-form","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnat%2Fsimple-php-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnat%2Fsimple-php-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnat%2Fsimple-php-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnat%2Fsimple-php-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnat","download_url":"https://codeload.github.com/gnat/simple-php-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244031029,"owners_count":20386534,"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","forms","php","php-form","php8","validation"],"created_at":"2024-10-10T18:18:18.706Z","updated_at":"2025-03-19T23:31:08.149Z","avatar_url":"https://github.com/gnat.png","language":"PHP","readme":"📝 Simple PHP Form\n==================\n![workflow](https://github.com/gnat/simple-php-form/actions/workflows/test.yml/badge.svg)\n\nAutomatic HTML `\u003cform\u003e` with validation, messages, warnings and more!\n\n* Form fields: `text`, `textarea`, `dropdown`, `checkbox`, `radio` and `hidden`\n* Validators: `required`, `email`, `phone`, `number`, `lengthmax *`, `lengthmin *`, `sizemax *`, `sizemin *`\n\n```php\n\u003c?php \n  require('SimplePHPForm.php'); \n  \n  $form = new SimplePHPForm();\n  $form-\u003eadd('name', 'text', '', ['required'], 'Name', '', 'Your name is required.');\n  $form-\u003eadd('email', 'text', '', ['required', 'email'], 'Email', '', 'Your email is required.');\n\n  if($form-\u003evalidate()) // Did the form validate successfully?\n  {\n    // Get data: $form-\u003eget('name'); ...\n    // Success ! Send an email or register user in a database somewhere...\n    $form-\u003ereset(); // Reset to default form.\n  }\n?\u003e\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003clink rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"css/simplephpform_default.css\" /\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003c?php echo $form-\u003edisplay(); ?\u003e\n  \u003c/body\u003e\n\u003c/html\u003e \n```\n\n## 🎁 Installation\n\nThis is a zero dependency library. \n\nJust drag `SimplePHPForm.php` into your project and `require('SimplePHPForm.php');`\n\nOptionally add the assets from `examples/css` and `examples/images` to your project.\n\n## 👁️ Examples + Screenshot\n\n* Basic usage: **./examples/basic.php**\n* Advanced usage: **./examples/advanced.php**\n* Center-aligned usage: **./examples/centered.php**\n\n\u003cimg src=\"http://i.imgur.com/PNtyxTl.png\" alt=\"Simple PHP Form Example 1\" /\u003e\n\n## Keywords\n\nForms, User Feedback, Model View Controller, PHP 8 Compatible, PHP 8+, email, input, simple, lean.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnat%2Fsimple-php-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnat%2Fsimple-php-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnat%2Fsimple-php-form/lists"}