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

113
Vistas
Set group field value in vue-formulate

I am trying to set a group field value when a radio button is ticked but it doesn't seem to be setting (no errors thrown either).

<formulate-form v-model="values" @submit="handleSubmission">
  <formulate-input
    v-if="values.calendar_size"
    type="radio"
    name="mailing_cartons"
    key="mailing_cartons"
    label="Would you like mailing cartons?"
    validation="required"
    @input="prepopulateDelivery()"
    :options="{ 1: 'Yes', 0: 'No' }"
  ></formulate-input>

  <formulate-input
    type="group"
    name="delivery"
    :repeatable="true"
    label="Delivery details:"
    add-label="+ Add Address"
    validation="required"
  >
    <formulate-input type="text" name="del_contact_name" label="Contact name:" validation="required"></formulate-input>
  </formulate-input>
</formulate-form>

Here is the JS:

new Vue({
  el: "#app",
  data: {
    values: {},
  },
  methods: {
    prepopulateDelivery() {
      if (this.values.mailing_cartons == 1) {
        console.log(this.values.delivery[0]); // works fine, logs an object correctly
        this.values.delivery[0].del_contact_name = "TEST"; // does nothing to the value
      }
    },
  },
});

I am expecting "TEST" to appear as a value in the contact name field but nothing is set.

Using vue@2.6.12 and vue-formulate@2.4.5

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