vue-select icon indicating copy to clipboard operation
vue-select copied to clipboard

Add Input "name" prop for using in forms

Open lisunovdv opened this issue 2 years ago • 0 comments

It will be very nice to have the ability to set HTML <input name="" attribute for easy form serializing:

<script setup>
const form = ref(null);
</scipt>
<form ref="form" method="POST" action="/add-user.php">
        <VueSelect :name="user_name_qx4fhrkkd" ...>
        <button
               type="submit"
               @submit="fetch(
                         '/add-user.php',
                        {
                             method: 'post',
                             body: new FormData(form),
                         },
)"></button>

Currently, we are using:

<VueSelect :value="val"></VueSelect>
<input type="hidden" name="user_name_qx4fhrkkd" value="val" />

lisunovdv avatar Sep 07 '22 18:09 lisunovdv