Skip to content

Instantly share code, notes, and snippets.

@waila7
waila7 / sendContactVanilla.js
Created December 19, 2017 13:58 — forked from omarkdev/sendContactVanilla.js
Send form contact with vanilla js
var formFooter = document.getElementById("form-footer");
formFooter.addEventListener("submit", function(evt) {
evt.preventDefault();
formFooter.classList.add("form-submit");
var name = document.getElementById("name");
var email = document.getElementById("email");
var telephone = document.getElementById("telephone");
var cellphone = document.getElementById("cellphone");
@waila7
waila7 / formspree-ajax-contact-form.js
Created December 19, 2017 13:56 — forked from siamkreative/formspree-ajax-contact-form.js
A plain JavaScript AJAX Contact Form that is designed to work with http://formspree.io/
/**
* AJAX Form
* http://stackoverflow.com/a/13038218/1414881
*/
var form = document.getElementById('contact_form');
// Append the form status
var formStatus = document.createElement('div');
formStatus.setAttribute('class', 'form-status alert');
@waila7
waila7 / HTML5Validation.html
Created December 19, 2017 11:59 — forked from scrubmx/HTML5Validation.html
Change the language of error message for html5 required fields.
/*
|-----------------------------------------------------------------------
| With HTML
|-----------------------------------------------------------------------
*/
<input
type="number"
id="userProvidedHeight"
min="211"
@waila7
waila7 / HTML5Validation.html
Created December 19, 2017 11:58 — forked from scrubmx/HTML5Validation.html
Change the language of error message for html5 required fields.
/*
|-----------------------------------------------------------------------
| With HTML
|-----------------------------------------------------------------------
*/
<input
type="number"
id="userProvidedHeight"
min="211"
@waila7
waila7 / PDFCreator_EmailAllResponses
Created December 6, 2017 13:55 — forked from andrewroberts/PDFCreator_EmailAllResponses
Google Apps Script to create a PDF from each of the rows in a Google Sheet
/*
PDF Creator - Email all responses
=================================
When you click "Create PDF > Create a PDF for each row" this script
constructs a PDF for each row in the attached GSheet. The value in the
"File Name" column is used to name the file and - if there is a
value - it is emailed to the recipient in the "Email" column.
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software