Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

110
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!