All Projects → malithmcr → react-php-contact-form

malithmcr / react-php-contact-form

Licence: GPL-3.0 license
Contact form React Component with PHP mail api. Demo:

Programming Languages

javascript
184084 projects - #8 most used programming language
PHP
23972 projects - #3 most used programming language
HTML
75241 projects
CSS
56736 projects
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to react-php-contact-form

Material-Design-Resume
A simple resume template with a material design touche , testing the Google style CSS ( indigo-green ).
Stars: ✭ 18 (-77.5%)
Mutual labels:  contact-form
osprey-delight
Osprey Delight is the free-minded artist's choice for a clutter-free and blazingly fast single-page portfolio.
Stars: ✭ 43 (-46.25%)
Mutual labels:  contact-form
p01contact
Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
Stars: ✭ 15 (-81.25%)
Mutual labels:  contact-form
Formicula
A template-driven form mailer for Zikula
Stars: ✭ 19 (-76.25%)
Mutual labels:  contact-form
travel treasury landing
Vue.js landing page connected to firebase auth for collecting user signups
Stars: ✭ 18 (-77.5%)
Mutual labels:  contact-form
grav-plugin-form
Grav Form Plugin
Stars: ✭ 48 (-40%)
Mutual labels:  contact-form
Contact-Form
The Lightweight Contact Form which send contact requests on your Telegram
Stars: ✭ 28 (-65%)
Mutual labels:  contact-form

Contact form React Component with PHP mail api.

status

version

All Contributors

This is the repo for tutorial in my blog post Create Contact form with react and php.

Usage of complete project.

Please clone this repo and in the project root directory, Please run:

docker-compose up -d

"If this command doesn't work, You will need to install docker first "

Frontend will run in localhost:3000 Api will run in localhost:8080

Old way ( If you want to run without docker):

npm install

please go to the /app folder and run npm install to install all the nessery npm modules.

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run build

Build this project for production.

Using only the component

If you want to use only the react component without using php api. Please download 'src/components/Form/' folder.

You can use the form component like this <Form config={config} />

Run PHP API with docker

First you need docker installed in you machine. Once you have docker installed please navigate to root folder from your terminal and run:

docker-compose up -d

Api will run in localhost:8080

props

config - object

Example of config prop:

Header

Watch the Video:

Header

.env

Make sure change api url in .env file

$ REACT_APP_API = http://localhost/react-contact-form/api/contact/index.php

Change this : http://localhost/react-contact-form/api/contact/index.php to whatever you want.

PHP Settings

Please go to ./api/config.php

and change adminEmail to your email. You will get email to this. $adminEmail = "[email protected]";

Header

Contributors

Thanks goes to these wonderful people (emoji key):


Malith Priyashan

🚇 ⚠️ 💻

Bret Wadleigh

🚧

Hans Kuijpers

💻

cscheerio

🚧

This project follows the all-contributors specification. Contributions of any kind welcome!


Header


I wrote a full article about this here: https://craftcode.design/contact-form-with-react-and-php/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].