0
I have 3 Checkbox. The first option is bread, the second option is fish and the third has salt. I want to use Tamplate Forms and not reactive Forms. Can someone help me?
<form #form="ngForm">
<label>
<input name="" type="checkbox">Tem pao</label>
<label name=""><input type="checkbox">Tem peixe</label>
<label><input type="checkbox" name=""">Tem sal</label>
<button type="submit" (click)="enviarPrint(form)">Enviar</button>
</form>
but in fact what needs it to return true or false to the backend?
– Willian
@Willian I actually want to return the same names... When you click on Have bread, return to the bank "Have bread". When it is has fish, return to the Bank "Has Fish". When it is has salt the same thing. Can help me ?
– Dan100
puts the value in the checkbox axo that resolves... value="has bread", if I am not mistaken when it ta false it does not print the value... if it is true prints the value. or put before sending in the sendPrint() this.opcao2 ? 'has bread' 'has no bread;
– Willian