Skip to content
Permalink
2bac1503b8
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
61 lines (58 sloc) 1.28 KB
<template>
<b-container>
<b-row>
<b-col>
<h1>Prospective / Freshmen Sign Up</h1>
<hr>
<app-form-fresh @validateSuccess="submitUnder" submit-title="Submit" :form-data="formData"></app-form-fresh>
</b-col>
</b-row>
</b-container>
</template>
<script>
import AppFormFresh from "@/components/AppFormFresh";
import axios from "axios";
export default {
name: "FormFreshmen",
components: {AppFormFresh},
data() {
return {
formData: {
type: 'prospective',
firstName: '',
lastName: '',
mail: '',
gender: '',
firstMajor: '',
secondMajor: '',
isInternational: false,
hometown: '',
availability: {}
}
}
},
methods: {
async submitUnder() {
try {
await axios.post('/api/form/underclassmen', this.formData)
.catch(function (error) {
console.log(error)
});
console.log('submit success');
this.$router.push('/landing');
} catch (e) {
console.log(e);
}
}
},
created() {
// change type, default is prospective
if (this.$route.query.type === 'freshmen') {
this.formData.type = 'freshmen'
}
}
}
</script>
<style scoped>
@import "../assets/styles/main.css";
</style>