@@ -23,84 +23,105 @@ <h2>Get A Free Quote Today!</h2>
23
23
<!-- Required Fields -->
24
24
< div class ="form-row ">
25
25
< div class ="form-group ">
26
- < label for ="name "> Full Name: </ label >
26
+ < label for ="name "> Full Name* </ label >
27
27
< input type ="text " id ="name " name ="name " required >
28
28
</ div >
29
29
< div class ="form-group ">
30
- < label for ="phone "> Phone Number: </ label >
30
+ < label for ="phone "> Phone Number* </ label >
31
31
< input type ="tel " id ="phone " name ="phone " required >
32
32
</ div >
33
33
</ div >
34
34
35
35
< div class ="form-row ">
36
36
< div class ="form-group ">
37
- < label for ="email "> Email:</ label >
37
+ < label for ="address "> Address*</ label >
38
+ < input type ="text " id ="address " name ="address " required >
39
+ </ div >
40
+ < div class ="form-group ">
41
+ < label for ="email "> Email*</ label >
38
42
< input type ="email " id ="email " name ="email " required >
39
43
</ div >
44
+ </ div >
45
+
46
+ < div class ="form-row ">
40
47
< div class ="form-group ">
41
- < label for ="zip "> Zip Code: </ label >
48
+ < label for ="zip "> Zip Code* </ label >
42
49
< input type ="text " id ="zip " name ="zip " required >
43
50
</ div >
44
51
</ div >
45
52
46
- < div class ="form-group ">
47
- < label for ="description " class ="textarea-label "> *Additional Information:</ label >
48
- < textarea id ="description " name ="description " rows ="4 " cols ="50 " required > </ textarea >
49
- </ div >
53
+ <!-- Optional Fields Toggle Button -->
54
+ < button type ="button " id ="toggle-optional-fields "> Want to speed up the process? Tell us more by clicking here!</ button >
50
55
51
56
<!-- Optional Fields -->
52
- < div class ="form-row ">
53
- < div class ="form-group ">
54
- < label for ="system "> System Model:</ label >
55
- < select id ="system " name ="system ">
56
- < option value =""> Select System Model</ option >
57
- < option value ="System1 "> System 1</ option >
58
- < option value ="System2 "> System 2</ option >
59
- < option value ="System3 "> System 3</ option >
60
- < option value ="OTHER "> OTHER (Specify)</ option >
61
- </ select >
62
- </ div >
63
- < div id ="other-system " class ="form-group " style ="display: none; ">
64
- < label for ="otherSystemInput "> Specify Other System:</ label >
65
- < input type ="text " id ="otherSystemInput " name ="otherSystemInput ">
57
+ < div id ="optional-fields " style ="display: none; ">
58
+
59
+ < div class ="form-row ">
60
+ < div class ="form-group ">
61
+ < label for ="arrays "> Number of Solar Arrays</ label >
62
+ < input type ="number " id ="arrays " name ="arrays ">
63
+ </ div >
64
+ < div class ="form-group ">
65
+ < label for ="stories "> Number of Stories</ label >
66
+ < input type ="number " id ="stories " name ="stories ">
67
+ </ div >
66
68
</ div >
67
- </ div >
68
69
69
- < div class ="form-row ">
70
- < div class ="form-group ">
71
- < label for ="arrays "> Number of Solar Arrays:</ label >
72
- < input type ="number " id ="arrays " name ="arrays ">
70
+ < div class ="form-row ">
71
+
72
+
73
+ < div class ="form-group ">
74
+ < label for ="description " class ="textarea-label "> Additional Information</ label >
75
+ < textarea id ="description " name ="description " rows ="1 " cols ="50 "> </ textarea >
76
+ </ div >
77
+
78
+ < div class ="form-group ">
79
+ < label for ="system "> System Model</ label >
80
+ < select id ="system " name ="system ">
81
+ < option value =""> Select System Model</ option >
82
+ < option value ="System1 "> System 1</ option >
83
+ < option value ="System2 "> System 2</ option >
84
+ < option value ="System3 "> System 3</ option >
85
+ < option value ="OTHER "> Other (Specify)</ option >
86
+ </ select >
87
+ </ div >
88
+
73
89
</ div >
74
- < div class ="form-group ">
75
- < label for ="stories "> Number of Stories:</ label >
76
- < input type ="number " id ="stories " name ="stories ">
90
+
91
+ < div id ="other-system " class ="form-row " style ="display: none; ">
92
+ < label for ="otherSystem "> Specify Other System</ label >
93
+ < input type ="text " id ="otherSystem " name ="otherSystem ">
77
94
</ div >
95
+
96
+
78
97
</ div >
79
98
80
99
<!-- Spam Protection -->
81
100
< input type ="text " name ="_gotcha " style ="display:none ">
82
101
83
102
<!-- Submit Button -->
84
- < input type ="submit " value ="Send ">
103
+ < input type ="submit " value ="Submit ">
85
104
</ form >
86
105
</ section >
87
106
88
107
<!-- Image and Text Description Section -->
89
- < section class ="image-text-section ">
90
- < div class ="image-text-container left ">
91
- < img src ="images/image1.jpg " alt ="Image 1 ">
108
+ < section class ="image-section ">
109
+ < div class ="image-container ">
110
+ < img src ="images/image1.png " alt ="Image 1 ">
111
+ < img src ="images/image2.png " alt ="Image 2 ">
92
112
</ div >
93
-
94
- < div class =" image-text-container right ">
95
- < img src ="images/image2.jpg " alt ="Image 2 ">
113
+ < div class =" image-container " >
114
+ < img src =" images/image3.png " alt =" Image 3 ">
115
+ < img src ="images/image4.png " alt ="Image 4 ">
96
116
</ div >
97
-
98
- < div class =" image-text-container left ">
99
- < img src ="images/image3.jpg " alt ="Image 3 ">
117
+ < div class =" image-container " >
118
+ < img src =" images/image5.png " alt =" Image 5 ">
119
+ < img src ="images/image6.png " alt ="Image 6 ">
100
120
</ div >
101
121
</ section >
102
122
103
- <!-- JavaScript for Form Submission Handling and OTHER System Input Toggle -->
123
+
124
+ <!-- JavaScript for Form Submission Handling and Optional Fields Toggle -->
104
125
< script >
105
126
document . getElementById ( 'quote-form' ) . addEventListener ( 'submit' , function ( event ) {
106
127
event . preventDefault ( ) ; // Prevent default form submission
@@ -113,6 +134,7 @@ <h2>Get A Free Quote Today!</h2>
113
134
if ( response . ok ) {
114
135
alert ( 'SUCCESS! Your quote request has been sent.' ) ;
115
136
this . reset ( ) ;
137
+ document . getElementById ( 'optional-fields' ) . style . display = 'none' ; // Hide optional fields after form reset
116
138
document . getElementById ( 'other-system' ) . style . display = 'none' ; // Hide OTHER input after form reset
117
139
} else {
118
140
alert ( 'FAILED... Please try again later.' ) ;
@@ -124,11 +146,23 @@ <h2>Get A Free Quote Today!</h2>
124
146
125
147
// JavaScript to toggle "Specify Other System" input
126
148
document . getElementById ( 'system' ) . addEventListener ( 'change' , function ( ) {
127
- const otherSystemInput = document . getElementById ( 'other-system' ) ;
149
+ const otherSystem = document . getElementById ( 'other-system' ) ;
128
150
if ( this . value === 'OTHER' ) {
129
- otherSystemInput . style . display = 'block' ;
151
+ otherSystem . style . display = 'block' ;
152
+ } else {
153
+ otherSystem . style . display = 'none' ;
154
+ }
155
+ } ) ;
156
+
157
+ // JavaScript to toggle optional fields visibility
158
+ document . getElementById ( 'toggle-optional-fields' ) . addEventListener ( 'click' , function ( ) {
159
+ const optionalFields = document . getElementById ( 'optional-fields' ) ;
160
+ if ( optionalFields . style . display === 'none' ) {
161
+ optionalFields . style . display = 'block' ;
162
+ this . textContent = 'The below fields are not required. Click here to hide them!' ;
130
163
} else {
131
- otherSystemInput . style . display = 'none' ;
164
+ optionalFields . style . display = 'none' ;
165
+ this . textContent = 'Want to speed up the process? Tell us more by clicking here!' ;
132
166
}
133
167
} ) ;
134
168
</ script >
0 commit comments