Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

120
Vistas
how to multiply fields with firestore depending on selection?

const bankSelect = document.getElementById("bank-select");
const сalculatePayment = document.getElementById("сalculate-payment");


// add bankName in Select
async function getAllBanks() {
  const snapshot = await firebase.firestore().collection("banks").get();
  return snapshot.docs.map(
    (doc) =>
      (bankSelect.innerHTML += `
  <option value="${doc.data().bankName}">${doc.data().bankName}</option>
  `)
  );
}


//count 
сalculatePayment.addEventListener("click", (event) => {
  event.preventDefault();
});

getAllBanks();

I store banks in a Firestore database. The bank is saved with fields, for example: numberOne, numberTwo, numberThree. I need, depending on the choice of the bank, when you click on the button, multiply the numbers that are recorded in the database for a particular bank. How can i do this?

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda