Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
Firebase not accept more fields for a document

I have a html modal for inputting data into Firebase's Firestore but it's not accepting more than the first 2 inputs and even though I removed the line that put the server timestamp on each document its still adding it to the documents. Below is the javascript code that I used :

import { initializeApp } from 'firebase/app'
import { 
  getFirestore, collection, onSnapshot,
  addDoc, deleteDoc, doc,
  query, where,
  orderBy,
  getDoc, updateDoc
} from 'firebase/firestore'
import { 
  getAuth, createUserWithEmailAndPassword,
  signInWithEmailAndPassword,
  signOut,
  onAuthStateChanged
} from 'firebase/auth'

initializeApp(firebaseConfig)

const db = getFirestore()
const colRef = collection(db, 'Guides')

//adding docs
const addGuideForm = document.querySelector('.add')
  addGuideForm.addEventListener('submit', (e) => {
    e.preventDefault()

    addDoc(colRef, {
      title: addGuideForm.title.value,
      content: addGuideForm.content.value,
      test: addGuideForm.content2.value,
      verif: addGuideForm.verif.value,
    })
    .then(() => {
      addGuideForm.reset()
    })
  })
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!