Techbyte Theme Documentation
Customizing the Contact Form
Techbyte includes a built-in contact form with support for Formspree, FormSubmit, and Netlify Forms.
You can edit the fields directly in Markdown frontmatter and change the form provider from src/config/config.toml.
How to Add a New Form Input
Step 1: Locate the Contact Form Markdown File
The contact form fields are driven by:
src/content/sections/<language>/contact-section.mdStep 2: Edit the Form Fields in Markdown Frontmatter
Techbyte’s default contact section includes text inputs, a standard select, a searchable select, and a submit button. It also renders the contact info list, whose items pull live values from settings.contactInfo in config.toml via settingFieldName:
---enable: truebadge: "CONTACT US"title: "Have Questions? Get in Touch!"list: - icon: "Navigation" settingFieldName: "address" - icon: "Phone" settingFieldName: "phone" - icon: "MailCheck" settingFieldName: "email"form: emailSubject: "New form submission from Techbyte website" submitButton: enable: true label: "Send Message" icon: enable: true name: "ArrowUpRight" position: "right" inputs: - label: "" placeholder: "Full Name *" name: "Full Name" required: true halfWidth: true - label: "" placeholder: "Email Address *" name: "Email Address" required: true type: "email" halfWidth: true - label: "" placeholder: "Project Type *" name: "Project Type" halfWidth: true dropdown: type: "search" search: placeholder: "Search project type" items: - label: "Managed Services" value: "Managed Services" - label: "Security Assessment" value: "Security Assessment"---Step 3: Add a New Input Field
To add a new field, append another object under form.inputs. Example:
- label: "" placeholder: "Website URL" name: "Website" type: "text" required: false halfWidth: trueYou can also add:
dropdown.type: ""for a standard selectdropdown.type: "search"for the searchable dropdown UI- a
textareafield by settingtag: "textarea"
Changing the Email for Form Submissions
Open src/config/config.toml and locate:
[settings] contactFormProvider = "formsubmit.co"Provider Examples
▶ For FormSubmit
[settings] contactFormProvider = "formsubmit.co"▶ For Formspree
[settings] contactFormAction = "https://formspree.io/f/yourformid" contactFormProvider = "formspree"▶ For Netlify
[settings] contactFormAction = "/" contactFormProvider = "netlify"Techbyte’s form component reads those values in src/layouts/components/widgets/ContactForm.astro.
Bonus Tips
- Keep
namevalues meaningful because those are the submitted field keys. requiredandtypeuse normal HTML validation behavior.- The map shown on the contact page comes from
settings.contactInfo.mapLinkinconfig.toml(a Google Maps embed URL).