popup contact form

How we can create a pop-up type contact form using HTML CSS JS? Solution: See this Popup Contact Form With Clean and Minimal Design, Expanding Form.

Previously I have shared an expanding contact form, this is also similar to that but it has a popup feature. Basically, the contact form is an important part of every website. And if you see most of the website’s main target is the contact page. If your major target is to navigate users to contact form, then you should place the form on every page, not on a single page. Using this kind of contact form program, you can put the form on every page by placing it on the footer, nav, or sidebar.

Today you will learn to create an expanding form for contact information. Basically, there is a button with the text ‘open contact form’ and when you will click on or over it the popup form will reveal. The popup box contains  3 input fields and buttons, 3 inputs for the name, email, message, and button for sending. Also, there is a minus icon for closing the popup box.

So, Today I am sharing Popup Contact Form With Clean and Minimal Design. There I have used HTML to create the layout, CSS for style, jQuery for function. The inputs contain some icons for showing about the field, all the icons are based on a third-party library. You can use this contact form on your website for placing the form on every page.

If you are thinking now how this contact form actually is, then see the preview given below.

Preview Of Expanding Form

See this video preview to getting an idea of how this expanding form looks like.

Live Demo

Now you can see this program visually, also you can see it live by pressing the button given above. If you like this, then get the source code of its.

You May Also Like:

Popup Contact Form Source Code

Before sharing source code, let’s talk about it. First I have created a button with class and ID name. After that, I have created a div named ‘contact’ and put a form inside it. Inside the form, I have placed 2 inputs, a text area, and a submit type input. All the elements contain a unique class or ID name. Also in the HTML file, I have linked external files like CSS, JS, and jQuery CDN file.

Now using CSS I have placed all the items in the right place, as you can see in the preview. With CSS I gave basic values like size, position, margin, padding, etc to the elements. There I have used the font-awesome library to place the icons. Also, I have used the CSS @media query to reduce the size of some elements for responsive design.

jQuery handling here the toggle open and close the popup form. There I have created multiple functions for all conditions. jQuery codes are a little complicated, you will understand after getting the codes I can’t explain all in writing. For creating this program you have to create 3 files. First file for HTML, second for CSS, and third file for JavaScript.

Follow the steps to creating this program without any error.

index.html

Create an HTML file named ‘index.html‘ and put these codes given below.

style.css

Now create a CSS file named ‘style.css‘ and put these codes given here.

function.js

The final step, create a JavaScript file named ‘function.js‘ and put the codes.

That’s It. Now you have successfully created Popup Contact Form With Clean and Minimal Design, Expanding Form. If you have any doubt or questions comment down below.

Thanks For Visiting, Keep Visiting.