Following are the simple steps to add contact form in static page..
Step 1: First you need to add the contact form widget by going into Layout > add a gadget > More gadgets > Contact form
Now the default blogger contact form is added to your blog.
Step 2: Now you have to add the CSS of New contact form which you need to show on the static page is to be added just above ]]></b:skin>
go to Template > Edit HTML
Search for ]]></b:skin> by pressing Ctrl + F key
Add the CSS Code given below just above ]]></b:skin>
Step 3 : Now you have to remove some code from contact form widget which you added in 1st step
go to Template > Edit HTML and search for ContactForm1
and remove the code which is highlighted in blue below.
create new static page and paste the below code in the html section of page
Step 1: First you need to add the contact form widget by going into Layout > add a gadget > More gadgets > Contact form
Now the default blogger contact form is added to your blog.
Step 2: Now you have to add the CSS of New contact form which you need to show on the static page is to be added just above ]]></b:skin>
go to Template > Edit HTML
Search for ]]></b:skin> by pressing Ctrl + F key
Add the CSS Code given below just above ]]></b:skin>
[/* Contact Form Container */(you can also change the colours of the contact form by changing the colour code in above CSS)
.contact-form-widget {
width: 500px;
max-width: 100%;
margin: 0 auto;
padding: 10px;
background: #F8F8F8;
color: #000;
border: 1px solid #C1C1C1;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
border-radius: 10px;
}
/* Fields and submit button */
.contact-form-name, .contact-form-email, .contact-form-email-message {
width: 100%;
max-width: 100%;
margin-bottom: 10px;
}
/* Submit button style */
.contact-form-button-submit {
border-color: #C1C1C1;
background: #E3E3E3;
color: #585858;
width: 20%;
max-width: 20%;
margin-bottom: 10px;
}
/* Submit button on mouseover */
.contact-form-button-submit:hover{
background: #4C8EF9;
color: #ffffff;
border: 1px solid #FAFAFA;
}]
Step 3 : Now you have to remove some code from contact form widget which you added in 1st step
go to Template > Edit HTML and search for ContactForm1
and remove the code which is highlighted in blue below.
[<b:widget id='ContactForm1' locked='false' title='Contact Form' type='ContactForm'>Step 4 : Now you have to add contact form code which is given below in new static page.
<b:includable id='main'>
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='contact-form-widget'>
<div class='form'>
<form name='contact-form'>
<p/>
<data:contactFormNameMsg/>
<br/>
<input class='contact-form-name' expr:id='data:widget.instanceId + "_contact-form-name"' name='name' size='30' type='text' value=''/>
<p/>
<data:contactFormEmailMsg/> <span style='font-weight: bolder;'>*</span>
<br/>
<input class='contact-form-email' expr:id='data:widget.instanceId + "_contact-form-email"' name='email' size='30' type='text' value=''/>
<p/>
<data:contactFormMessageMsg/> <span style='font-weight: bolder;'>*</span>
<br/>
<textarea class='contact-form-email-message' cols='25' expr:id='data:widget.instanceId + "_contact-form-email-message"' name='email-message' rows='5'/>
<p/>
<input class='contact-form-button contact-form-button-submit' expr:id='data:widget.instanceId + "_contact-form-submit"' expr:value='data:contactFormSendMsg' type='button'/>
<p/>
<div style='text-align: center; max-width: 222px; width: 100%'>
<p class='contact-form-error-message' expr:id='data:widget.instanceId + "_contact-form-error-message"'/>
<p class='contact-form-success-message' expr:id='data:widget.instanceId + "_contact-form-success-message"'/>
</div>
</form>
</div>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget>]
create new static page and paste the below code in the html section of page
[<div class='widget ContactForm' id='ContactForm1'>All Done...
<div class='contact-form-widget'>
<div class='form'>
<form name='contact-form'>
<p>Name</p>
<input class='contact-form-name' id='ContactForm1_contact-form-name' name='name' size='30' type='text' value=''/>
<p>E-mail *</p>
<input class='contact-form-email' id='ContactForm1_contact-form-email' name='email' size='30' type='text' value=''/>
<p>Message *</p>
<textarea class='contact-form-email-message' cols='25' id='ContactForm1_contact-form-email-message' name='email-message' rows='5'></textarea>
<input class='contact-form-button contact-form-button-submit' id='ContactForm1_contact-form-submit' type='button' value='Submit'/>
<p class='contact-form-error-message' id='ContactForm1_contact-form-error-message'></p>
<p class='contact-form-success-message' id='ContactForm1_contact-form-success-message'></p>
</form>
</div>
</div>
</div>]
Post a Comment
Post a Comment