conversational-form icon indicating copy to clipboard operation
conversational-form copied to clipboard

datalist options hidden value, show only label

Open keyboardbreaker opened this issue 5 years ago • 6 comments

So I've followed the docs on using autocomplete.

Is there a way to hide the forms inputed value and only display the label.

basically my problem is that both show, when desirably label is all that is needed.

Screenshot 2019-11-22 at 13 19 01

keyboardbreaker avatar Nov 22 '19 13:11 keyboardbreaker

hii, do you find a solution? I have the same problem

aidacarbajo avatar May 25 '21 07:05 aidacarbajo

im sorry i didnt find a solution

keyboardbreaker avatar May 25 '21 07:05 keyboardbreaker

Hello, I also faced the same problem but there is no native way. For achieving that.

sidverma24 avatar May 28 '21 07:05 sidverma24

Hello, I also faced the same problem but there is no native way. For achieving that.

Yes, I finally did a dirty 'solution' that I really don't like hahaha. I write the emails of the users on the value like this value="{{usuario.email}}" and their id like id="{{usuario.uid}}". So before sending the form I modified the value of the selected option by its id.

var datasetEvento = <HTMLInputElement>document.getElementById("eventoss");  // input
var inputEvento = datasetEvento.value;  // input value
var idEvento = document.querySelector("#eventos option[value='"+inputEvento+"']").id; // id from the selected option of the dataset #eventos
this.datosForm.value.evento = idEvento;

aidacarbajo avatar May 28 '21 08:05 aidacarbajo

Write inside the input autocomplete="off"

odaeshbli87 avatar Nov 13 '23 17:11 odaeshbli87

<input "autocomplete="off">

odaeshbli87 avatar Nov 13 '23 17:11 odaeshbli87