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

159
Vistas
Write back values to HTML form from XMLHttpRequest

I'm working on an embedded device (ESP32) serving static pages from the internal flash (SPIFFS). I'm looking for a simple way to populate the form values with the actual values since with this approach they are loaded with the default values.

I have a working XMLHttpRequest communication channel. For example I'm able to POST the form values retrieving them with:

document.getElementById("form-controls").onsubmit = function (event) {
    event.preventDefault();
    fetch("/controls", {
        method: 'post',
        body: new FormData(document.getElementById("form-controls"))
    }).then(function(response) {
    });
}

I wondering if there's the opposite function. Using a GET method on the same url I would answer from my MCU with the actual values to be written in the form fields.

I'm able to do this manually using JSON and updating each input tag via javascript. My question is if there is an equivalent of FormData that given an input data can fill automatically the related form fields.

about 4 years ago · Juan Pablo Isaza
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