{"id":15639941,"url":"https://github.com/malithmcr/react-php-form","last_synced_at":"2025-04-15T03:54:16.249Z","repository":{"id":34040776,"uuid":"159239693","full_name":"malithmcr/react-php-form","owner":"malithmcr","description":"Contact form React Component with PHP mail api. Demo: ","archived":false,"fork":false,"pushed_at":"2023-03-03T07:50:45.000Z","size":5772,"stargazers_count":93,"open_issues_count":11,"forks_count":73,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-15T03:54:10.387Z","etag":null,"topics":["component","contact-form","php","react-php","reactjs"],"latest_commit_sha":null,"homepage":"https://malithmcr.github.io/react-php-contact-form/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malithmcr.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":null,"patreon":null,"open_collective":null,"ko_fi":"malithmcr","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.com/paypalme2/craftcode"]}},"created_at":"2018-11-26T22:10:37.000Z","updated_at":"2025-01-27T06:00:04.000Z","dependencies_parsed_at":"2024-10-22T17:30:51.589Z","dependency_job_id":null,"html_url":"https://github.com/malithmcr/react-php-form","commit_stats":null,"previous_names":["malithmcr/react-php-form","malithmcr/react-php-contact-form"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithmcr%2Freact-php-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithmcr%2Freact-php-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithmcr%2Freact-php-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malithmcr%2Freact-php-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malithmcr","download_url":"https://codeload.github.com/malithmcr/react-php-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003955,"owners_count":21196794,"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":["component","contact-form","php","react-php","reactjs"],"created_at":"2024-10-03T11:28:43.792Z","updated_at":"2025-04-15T03:54:16.234Z","avatar_url":"https://github.com/malithmcr.png","language":"JavaScript","readme":"## Contact form React Component with PHP mail api.\n\n[![status](https://travis-ci.org/malithmcr/react-php-contact-form.svg?branch=master)](https://travis-ci.org/malithmcr/react-php-contact-form.svg?branch=master)\n\n[![version](https://img.shields.io/badge/version-1.0.1-yellow.svg)](https://semver.org)\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)\n\nThis is the repo for tutorial in my blog post [Create Contact form with react and php](https://blog.bitsrc.io/how-to-build-a-contact-form-with-react-js-and-php-d5977c17fec0).\n\n## Usage of complete project.\n\nPlease clone this repo and in the project root directory, Please run:\n\n`docker-compose up -d`\n\n \"If this command doesn't work, You will need to install docker first \"\n\nFrontend will run in localhost:3000\nApi will run in localhost:8080\n\n\nOld way ( If you want to run without docker): \n\n### `npm install`\n\nplease go to the /app folder and run npm install to install all the nessery npm modules.\n\n### `npm start`\n\nRuns the app in the development mode.\u003cbr\u003e\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.\u003cbr\u003e\nYou will also see any lint errors in the console.\n\n### `npm run build`\n\nBuild this project for production.\n\n\n## Using only the component\nIf you want to use only the react component without using php api.\nPlease download 'src/components/Form/' folder.\n\nYou can use the form component like this  `\u003cForm config={config} /\u003e`\n\n\n## Run PHP API with docker\nFirst you need docker installed in you machine. Once you have docker installed please \nnavigate to root folder from your terminal and run:\n\n`docker-compose up -d`\n\nApi will run in localhost:8080\n\n\n#### props\n\n`config - object`\n\nExample of config prop:\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://www.paypal.me/craftcode\"\u003e\u003cimg alt=\"Header\" src=\"/config-obj.png?raw=true\" width=\"70%\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\nWatch the Video: \n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://www.youtube.com/watch?v=_f16vyORzJ8\"\u003e\u003cimg alt=\"Header\" src=\"https://img.youtube.com/vi/_f16vyORzJ8/0.jpg\" width=\"70%\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\n#### .env\n\nMake sure change api url in .env file\n\n    $ REACT_APP_API = http://localhost/react-contact-form/api/contact/index.php\n\nChange this : http://localhost/react-contact-form/api/contact/index.php to whatever you want.\n\n## PHP Settings\n\nPlease go to ./api/config.php\n\nand change adminEmail to your email. You will get email to this.\n     $adminEmail =  \"hey@malith.dev\"; \n\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://www.paypal.me/craftcode\"\u003e\u003cimg alt=\"Header\" src=\"/screenshot.png?raw=true\" width=\"80%\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://craftcode.design/\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/4549859?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMalith Priyashan\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#infra-malithmcr\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"https://github.com/malithmcr/react-php-contact-form/commits?author=malithmcr\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/malithmcr/react-php-contact-form/commits?author=malithmcr\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://bretwadleigh.net\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/923404?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBret Wadleigh\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-bretwadleigh\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://hkweb.nl\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/639822?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHans Kuijpers\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/malithmcr/react-php-contact-form/commits?author=hans2103\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/cscheerio\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/49214389?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ecscheerio\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-cscheerio\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://www.paypal.me/craftcode\"\u003e\u003cimg alt=\"Header\" src=\"https://cdn-images-1.medium.com/max/806/1*G95uyokAH4JC5Ppvx4LmoQ.png\" width=\"20%\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\nI wrote a full article about this here: https://craftcode.design/contact-form-with-react-and-php/\n","funding_links":["https://ko-fi.com/malithmcr","https://www.paypal.com/paypalme2/craftcode","https://www.paypal.me/craftcode"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalithmcr%2Freact-php-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalithmcr%2Freact-php-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalithmcr%2Freact-php-form/lists"}