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

273
Vistas
Trying to find the right way to send a multiple select input to backend

I have an events calendar app and using Ionic/React/Flask. There is a form for submitting an event. I have an item where you can select the frequency of the event. When you could just choose one it worked perfectly. But now I've made it so that the user can select mutliple options:

<IonItem>
            <IonLabel>Frequency</IonLabel>
            <IonSelect value={EFreq} multiple={true} placeholder="Select One" onIonChange={e => setEFreq(e.detail.value)}>
              <IonSelectOption value="Weekly">Weekly</IonSelectOption>
              <IonSelectOption value="1st week">1st week of the month</IonSelectOption>
              <IonSelectOption value="2nd week">2nd week of the month</IonSelectOption>
              <IonSelectOption value="3rd week">3rd week of the month</IonSelectOption>
              <IonSelectOption value="4th week">4th week of the month</IonSelectOption>
            </IonSelect>
          </IonItem>

When the user selects multiple options the state variable becomes an array like:

['1st week','2nd week']

When I send this to my Flask backend I get an error

Operand should contain 1 column(s)

I thought if I could somehow join the array elements like 1st week 2nd week that could work.

So I tried to take the state variable and join it like

SetEFreq(Efreq.join())

but haven't quite figured that out yet but am told that it's not great to change the type from an array to a string. It's error prone.

So right now I'm not sure how to handle this. Should I try and get my flask backend to accept the array? Should I find a way to alter the input so it is just a string that goes to the backend? Not sure what is the best approach. How do people do a multiple option form input with flask?

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