-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2019-sacramento.html
150 lines (136 loc) · 6.01 KB
/
2019-sacramento.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content="Diana Condon">
<meta name="description" content="The Condon Sacramento Celebration">
<title>The Condon Wedding - Sacramento</title>
<link rel="stylesheet" href="css/main.css"/>
<link rel="icon" type="png" href="img/animojis.png">
</head>
<body>
<div class="content">
<!-- HEADER -->
<div class="sac-header">
<h1>Logan & Diana's Sacramento Celebration!</h1>
</div>
<div class="us">
<img class="us-image" src="img/[email protected]"/>
</div>
<div class="join">
<h2>Join Us!</h2>
<p class="where">
4pm, June 15 2019
<br> <br>
1220 Stewart Road
<br>
Sacramento, California
<p>
</div>
<div class="rsvp">
<h2>R S V P</h2>
<div class="rsvp-form">
<form name="submit-to-google-sheet" enctype="text/plain">
<div class="row">
<div class="col-25">
<label for="fname">First Name</label>
</div>
<div class="col-75">
<input type="text" id="fname" name="firstname" placeholder="Your first name.." required>
</div>
</div>
<div class="row">
<div class="col-25">
<label for="lname">Last Name</label>
</div>
<div class="col-75">
<input type="text" id="lname" name="lastname" placeholder="Your last name.." required>
</div>
</div>
<div class="row">
<div class="col-25">
<label for="attending">Attending?</label>
</div>
<div class="col-75">
<input type="radio" name="attending" value="YES"> Accept with pleasure<br>
<input type="radio" name="attending" value="no"> Decline with regret<br>
<!--<select id="attending" name="attending">
<option value="yes">Accepts with pleasure</option>
<option value="no">Declines with regret</option>
</select>-->
</div>
</div>
<div class="row">
<div class="col-25">
<label for="dietary">Dietary Restrictions</label>
</div>
<div class="col-75">
<select name="dietary" id="dietary" onchange='CheckDiet(this.value);'>
<option value="none">None</option>
<option value="vegetarian">Vegetarian</option>
<option value="vegan">Vegan</option>
<option value="pescatarian">Pescatarian</option>
<option value="glutenfree">Gluten Free</option>
<option value="allergies">Allergies / Other</option>
</select>
<input type="text" name="allergies" id="allergies" placeholder="I avoid _____" style='display:none;'/>
</div>
</div>
<div class="row">
<div class="col-25">
<label for="song">Song Requests</label>
</div>
<div class="col-75">
<textarea id="song" name="song" placeholder="Any jams that NEED to be on our playlist?" style="height:100px"></textarea>
</div>
</div>
<div class="row">
<div class="buttons">
<input class="button" type="submit" value="Send" id="left-button">
<input class="button" type="reset" value="Reset" id="right-button">
</div>
</div>
</form>
<script>
const scriptURL = 'https://script.google.com/macros/s/AKfycbxXyb_UBfSNKtxIrlbxPVqW9ureObhs3IQpvtYXhGsTKZftV0s/exec'
const form = document.forms['submit-to-google-sheet']
form.addEventListener('submit', e => {
e.preventDefault()
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response => console.log('Success!', response))
.catch(error => console.error('Error!', error.message))
confirm("All set! See you there!");
})
function CheckDiet(val){
var element=document.getElementById('allergies');
if(val=='allergies'){
element.style.display='block';
element.style.paddingTop='8px';
element.style.marginTop='8px';
}
else {
element.style.display='none';
}
}
</script>
</div>
</div>
<div class="details">
<h2>Details</h2>
<p>
Registry: <a href="https://www.zola.com/registry/condons">www.zola.com/condons</a>
</p>
<p>
Questions: <a href="mailto:[email protected]">[email protected]</a>
</p>
</div>
</div>
<footer class="footer">
<div>
crafted with love by <a href="http://www.dianacondon.com" target="_blank">Diana Condon</a>
<img class="footer-logo" src="img/pinecone.png"/>
</div>
</footer>
</body>
</html>