I need to complete the form inputs automatically in html but the target doesn't have name or Id. So I'm trying this JavaScript code
document.querySelectorAll("input")[3].value = 'Alex'; // firstname
Filling in this input command, but if I try to click on other inputs, the system clears the value of my inputs
This is html input code
<div class="input-item" placeholder="enter your name" data-v-123123="">
<label class="label">
<!---->name:</label>
<input autocomplete="off" class="red" placeholder="" type="text">
<p class="errors">
<ul><li>» name is required </li></ul>
</p>
</div>
This is vuejs code
<input-element
ref="first_name"
:validations="['requiredMin(2)', 'max(25)', 'fa']"
:label="is_personal ? 'name' : 'company name'"
:placeholder="is_personal"
v-model="api_data.first_name"
/>