Form with array - problem with select options

Posted 4 months ago by mlutz

Hello, i need a form to edit some data. From the Api I receive the following data


I would like to list the data and change the visit-state.

 <ul v-if="players">
            <li v-for="{ id, firstname, lastname } in players">
            {{ firstname }} {{ lastname }} 
                <option value="X">Present</option>
                <option value="E">Excuse</option>
                <option value="D">Diseased</option>

My first problem: How can i list the received data? The players are displayed. But the old Value is not selected and in the second step i want to save the changes to the api. Thanks for help.

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.