• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

306
Vistas
wixData.insert() inserting blank into collection

I have the following code in my backend on my Wix site. It is meant to insert some values into a private data collection. Here it is:

export function insertDataMembers(username, email, password, wsmoStatus, ssmoStatus) {
    let toInsert = {
        'title': username.value,
        'email': email.value,
        'password': password.value,
        'wsmoStatus': wsmoStatus,
        'ssmoStatus': ssmoStatus
    };

    wixData.insert('members', toInsert, options);
}

When I call this from the frontend, it inserts a new row in the collection, but everything except for the hidden fields is blank. I'm using suppressAuth and suppressHooks. What's going wrong? (The wsmoStatus and ssmoStatus variables are booleans, the rest should be strings).

almost 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Oops, I just realized what was wrong. I also asked this on the Velo by Wix forum and got a reply there that helped me. I think the issue was that I was using .value but the variables I was using that on are not strings. I removed the .value and it worked, so I think that was it.

almost 3 years ago · Juan Pablo Isaza Denunciar
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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda