Answer the question
In order to leave comments, you need to log in
Is it possible to replace two radios with one with the same logic, but in one radio?
Now only one input ( top ) is selected by clicking, is it possible to somehow replace these two inputs with one with the same functionality
? The logic now is that when you click on the label, only one input is selected, therefore it inserts a link to the image in img, input is not selectable and does not insert an image name. How to fix?
<label v-for="image in result.images" :key="image.imageId" class="p-1 flex color-b relative" :data-value="image.name">
<input type="radio" v-model="result.profileImg" name="profileImg" :value="image.imgId" class="hidden">
<input type="radio" v-model="result.profileName" name="profileName" :value="image.name" class="hidden" >
</label>
<img :src="result.profileImg" alt="" class="p-2 h-64 mx-auto">
<p id="name">{{result.profileName}}</p>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question