oroalej
352
4
Vue

How to use v-for index inside formcollective

Posted 1 year ago by oroalej

Is it possible to use v-for index inside formcollective?

Here is an example:

      <div v-for="(question, index) in questions" style="margin-top: 20px">
          {{ Form::text('question[@{{index}}][answers][1]', null, ['class' => 'form-control']) }}

I want to add the index of v-for as the array index in the attribute name.

Please sign in or create an account to participate in this conversation.