-
Notifications
You must be signed in to change notification settings - Fork 33
contact form added #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: vue
Are you sure you want to change the base?
Changes from 6 commits
1d79870
126ad03
c3abfa1
bae25ac
2ca99ab
da03cd8
63c2d87
055120f
acc5855
0eb7fd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,8 +38,54 @@ v-container(fluid='' style='margin: 0px; padding: 0px; width: 100%;') | |
| h1.font-weight-medium.pa-3(style="text-align: center;color:#000") {{item.heading}} | ||
| h3.font-weight-light.mb-n.pa-3(style="text-align: center;color:#000") {{item.subheading}} | ||
| v-flex(xs12='',sm12='', md4='',lg4='',xl4='') | ||
| v-img.mt-5.ml-n3.mr-3(:src="item.src" contain aspect-ratio='2.5') | ||
| v-img.mt-5.ml-n3.mr-3(:src="item.src" contain aspect-ratio='2.5') | ||
|
|
||
|
|
||
| div(align='center', class="form-container" justify='center') | ||
| v-section.Form(name="formSection") | ||
| div.container.col-sm-10(class="my-5" name="") | ||
| v-row(class="no-gutters pb-5" id="formRow") | ||
| div.col-lg-5.col-md-5(class="pt-11 pl-7 pb-0" align="center" justify="center") | ||
| v-img.img-fluid(src="../assets/contactUs.png" id="contactImg" align="center" justify="center") | ||
| div.col-lg-7.col-md-7( justify='center' class='px-5') | ||
samarth-1729 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| div.col-lg-9(align="center" justify="left") | ||
| iframe(name="hiddenFrame" width="0" height="0" border="0" style="display: none;" | ||
| onload="if(submitted){location.reload()}") | ||
| v-form(class="login my-3" id="user_info_submit" name="form" | ||
| action="https://docs.google.com/forms/d/e/1FAIpQLSeyQ2dD8L6DkyYjL_3JzWyZUD1IhOelzgEO8O4kVcdySFVehA/formResponse" | ||
| method="POST" target="hiddenFrame" | ||
| v-model="validForm" | ||
| onsubmit="submitted=true;" | ||
| ) | ||
| h1(style="color: #1b65c4; font-size: 2.5rem" class="font-weight-bold py-3") Contact Us | ||
| div.form-row(name="inputEmail") | ||
samarth-1729 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| v-text-field( | ||
| lable="Email: " id="email" name="entry.785378515" color='#1b65c4' | ||
| type="email" placeholder="Email" | ||
| v-model="emailAddress" | ||
| :rules="emailRules") | ||
| div.form-row(name="inputName") | ||
samarth-1729 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| v-text-field( | ||
| lable="full name: " id="name" name="entry.2032351164" color='#1b65c4' | ||
| type="text" placeholder="Full Name" | ||
| counter=50 | ||
| :rules="[required('Name'), minLength('Name', 4), maxLength('Name', 50)]") | ||
| div.form-row(name="inputPhone") | ||
samarth-1729 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| v-text-field( | ||
| lable="phone" color='#1b65c4' id="phone" name="entry.1442733485" | ||
| type="phone" placeholder="Contact Number" | ||
| counter=true | ||
| v-model="mobileNo" | ||
| :rules="numberRules") | ||
| div.form-row(name="inputSuggestion") | ||
|
||
| v-text-field(lable="comments" color='#1b65c4' | ||
| name="entry.1558155518" type="textarea" | ||
| placeholder="Put You suggestions here" | ||
| id="suggestion" | ||
| counter=true | ||
| ) | ||
| div.form-row(name="inputButton") | ||
samarth-1729 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| v-btn(color='#1b65c4' class='my-3' type="submit" :disabled="!validForm").white--text Submit | ||
| </template> | ||
| <script> | ||
| export default { | ||
|
|
@@ -100,7 +146,47 @@ export default { | |
| subheading: | ||
| "Self Learning sits at the heart of devlup labs, we believe in proper utilization of resources and peer guidance to propel self learning." | ||
| } | ||
| ] | ||
| ], | ||
| validForm: false, | ||
| submitted: false, | ||
| emailAddress: "", | ||
| emailRules: [ | ||
| v => !!v || "E-mail is required", | ||
| v => /.+@.+\..+/.test(v) || "E-mail must be valid" | ||
| ], | ||
| mobileNo: "", | ||
| numberRules: [ | ||
| v => !!v || "Mobile number is required", | ||
| v => | ||
| (/^[0-9]{10}/.test(v) && v.length <= 13) || | ||
| "Mobile number must be valid" | ||
| ], | ||
| required(propertyType) { | ||
| return v => !!v || `You must input a ${propertyType}`; | ||
| }, | ||
| minLength(propertyType, minLength) { | ||
| return v => | ||
| (v && v.length >= minLength) || | ||
| `${propertyType} must be atleast ${minLength} characters!`; | ||
| }, | ||
| maxLength(propertyType, maxLength) { | ||
| return v => | ||
| (v && v.length <= maxLength) || | ||
| `${propertyType} must be less than ${maxLength} characters!`; | ||
| } | ||
| }) | ||
| }; | ||
| </script> | ||
|
|
||
| <style scoped> | ||
| #formRow { | ||
|
||
| background-color: white; | ||
| border-radius: 15px; | ||
| } | ||
| #contactImg { | ||
| max-height: 300px; | ||
| max-width: 400px; | ||
| margin-top: 40px; | ||
samarth-1729 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| border-radius: 20px; | ||
|
||
| } | ||
| </style> | ||
Uh oh!
There was an error while loading. Please reload this page.