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

186
Vistas
Multiple submit buttons on Kendo Form

Is it possible to have multiple submit buttons, each of them calling another function in Kendo?

For example I have a form like this:

<Form
      onSubmit={handleSubmit}
      render={(formRenderProps) => (
        <FormElement
          style={{
            maxWidth: 650,
          }}
        >
          <fieldset className={"k-form-fieldset"} style={{marginTop:'2vh'}}>
            <legend className={"k-form-legend"}>
              Atributes:
            </legend>
            <div className="mb-3">
            {tempAtr.map((data) => 
              <Field
                name={data.naziv}
                component={ data.id === 1 ?Input: 
          data.id === 2 ?Input: 
          data.id === 3 ?DatePicker: 
          data.id === 4 ?Input:
          data.id === 5 ?Input:
          data.id === 6 ?DropDownList:
          data.id === 7 ?DropDownList:
          data.id === 8 ?MultiSelect:
          data.id === 9 ?MultiSelect:
         Input}
                label={data.name}
              />)}
            </div>
          </fieldset>
          <div className="k-form-buttons">
            <Button
              type={"submit"}
              className='appBar-containers'
              disabled={!formRenderProps.allowSubmit}
            >
              Save
            </Button>
            <Button
              type={"submit"}
              className='appBar-containers'
              disabled={!formRenderProps.allowSubmit}
            >
              Start
            </Button>
          </div>
        </FormElement>
      )}
    />

So when I click Save, it goes to SaveFunction, and when I click Start, it goes to StartFunction. Any help would be very appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If anybody is looking for an answer, I did it this way. Added an id to each of the buttons:

<Button id='SaveButton'>Save</Button>
<Button id='StartButton'>Start</Button>

and in the onSubmit function added this:

const handleSubmit = (dataItem,event) => 
    {
      if(event.nativeEvent.submitter.id=='StartButton')
      {
        startSession(dataItem);
      }
      else
      {
        saveChanges(dataItem);
      }
        
    };
about 4 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 Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda