pankajkumarbij / easy-job-intern

The main motive behind the design of this project to provide the best job and internship opportunities.
MIT License
28 stars 75 forks source link

Handling Contact Us Form submission using Formspree API #75

Closed healer9 closed 3 years ago

healer9 commented 3 years ago

Is your feature request related to a problem? Please describe.

Creating Contact Us Form using Formspree.

Describe the solution you'd like

I'll create contact-us form UI using React JS on the frontend and send the data of the user to the project admin email through Formspree API.

I'm going to edit the contact-us.js file and update it using react functional component i.e, Hooks. After that, on submission of the contact-us form, I'll send the user data to the project's admin email, using Formspree API.

Additional context

By using Formspree we don't require to connect our frontend contact-us form to the backend to store the data in the database.

healer9 commented 3 years ago

@pankajkumarbij assign this issue to me and provide me the fields you want to be in the contact-us form.

You have to create an account on the Formspree website and you also have to generate a token (secret). So that formspree API can authenticate through it.

Provide me the email where I've to send the data on submission of the form and the generated token.

pankajkumarbij commented 3 years ago

@healer9 Go ahead

pankajkumarbij commented 3 years ago

@pankajkumarbij assign this issue to me and provide me the fields you want to be in the contact-us form.

You have to create an account on the Formspree website and you also have to generate a token (secret). So that formspree API can authenticate through it.

Provide me the email where I've to send the data on submission of the form and the generated token.

Contact us form fields: Name, Email, Mobile no(optional), message.

Can you work with your email id and token as of now because it is easy to check that email is working or not with the sent msg.

After that when work is ready to make a PR then I will give you a token and email id or you can use the .env file to configuring secrete key and email id.

If you want to work only with my account then I will provide you tomorrow.

healer9 commented 3 years ago

contact-us

Do I have to change the current UI or its ok?

Or do I have to implement only the submission handling part of the contact-us form?

pankajkumarbij commented 3 years ago

@healer9 If you can implement a better UI for the contact us page then it is well and good otherwise you can work with the submission handling part only.

healer9 commented 3 years ago

@pankajkumarbij Can I use Axios (npm) for posting data to the formspree server?

pankajkumarbij commented 3 years ago

@healer9 you can use axios but try to use fetch because all other backend part is use fetch method for request, so its good to use same method for all.

healer9 commented 3 years ago

@pankajkumarbij assign this issue to me and provide me the fields you want to be in the contact-us form. You have to create an account on the Formspree website and you also have to generate a token (secret). So that formspree API can authenticate through it. Provide me the email where I've to send the data on submission of the form and the generated token.

Contact us form fields: Name, Email, Mobile no(optional), message.

Can you work with your email id and token as of now because it is easy to check that email is working or not with the sent msg.

After that when work is ready to make a PR then I will give you a token and email id or you can use the .env file to configuring secrete key and email id.

If you want to work only with my account then I will provide you tomorrow.

@pankajkumarbij

I'm ready to make a pull request.

I check my work and the form is also getting submitted successfully. And the contact form data is also sent to the email address(Currently on my email) successfully. 🙂

pankajkumarbij commented 3 years ago

@healer9 I will provide you details tomorrow after create account, you can make PR after I will send you details email and token secret key.

pankajkumarbij commented 3 years ago

@healer9 After login which type of project I need to create?

Please tell all the steps for generating the key and all.

healer9 commented 3 years ago

Steps to follow:

project-name

get-started

create-form

end-point

settings

submissions

all-submissions

I think this will help you @pankajkumarbij .

pankajkumarbij commented 3 years ago

@healer9 Nice Explanation I understood and created API successfully But I can't give API here in the comment because it will visible to the public. Make a PR, I will chnage API there. You tell me where I should chnage API. Please remove your API details before making a PR.

healer9 commented 3 years ago

Ok I'll.

@pankajkumarbij Can you please update the GSSOC label to GSSOC21.

pankajkumarbij commented 3 years ago

@healer9 I have updated the label name.