Chrome detects some input fields as credit card fields. How do I avoid it in HTML?
It seems that Chrome will detect such fields using some regex on field names etc (see: here).
The only known solution for me right now is to rename the field.
I have tried using autocomplete="off"
and autocomplete="new-password"
.
Is there any HTML attributes or tricks that can avoid this?
Screenshot:
The Thymeleaf code for the input field:
<td class="report-form-td2">
<input class="calendar2 input-s" type="text"
placeholder="dd-mm-yyyy"
th:field="*{dateStr}"
maxlength="10" autocomplete="off"/>
</td>
Which transforms to this HTML:
<td class="report-form-td2">
<input class="calendar2 input-s" type="text"
placeholder="dd-mm-yyyy"
id="dateStr" name="dateStr"
maxlength="10" autocomplete="off"/>
</td>
Thank you.