Feat: Contact Form MySQL database created and hooked up to web app on form submission. \n Fix: Removal of ERP and otherwise deprecated database and server code..
This commit is contained in:
@@ -12,7 +12,8 @@ Defines Flask-WTF form for handling user input on Contact Us page.
|
||||
|
||||
# IMPORTS
|
||||
# internal
|
||||
# from business_objects.store.product_category import Filters_Product_Category # circular
|
||||
from business_objects.base import Base
|
||||
from business_objects.project_hub.contact_form import Contact_Form
|
||||
# from models.model_view_store import Model_View_Store # circular
|
||||
from models.model_view_base import Model_View_Base
|
||||
from forms.base import Form_Base
|
||||
@@ -85,3 +86,15 @@ class Form_Contact(FlaskForm):
|
||||
# altcha = HiddenField('ALTCHA') # , validators=[validate_altcha]
|
||||
altcha = ALTCHAField('Verify you are human')
|
||||
submit = SubmitField('Send Message')
|
||||
|
||||
def to_json(self):
|
||||
return {
|
||||
Base.FLAG_EMAIL: self.email.data
|
||||
, Contact_Form.FLAG_NAME_CONTACT: self.contact_name.data
|
||||
, Contact_Form.FLAG_NAME_COMPANY: self.company_name.data
|
||||
, Contact_Form.FLAG_MESSAGE: self.message.data
|
||||
, Contact_Form.FLAG_RECEIVE_MARKETING_COMMUNICATIONS: self.receive_marketing.data
|
||||
, Contact_Form.FLAG_ALTCHA: self.altcha.data
|
||||
, Base.FLAG_ACTIVE: True
|
||||
, Base.FLAG_CREATED_ON: None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user