-1
In other words, each button should trigger a different message. I have this field that has two buttons and I need each of them to present a different warning message in case of not filling. But the idea is not to fill out the form and use the button #1.
The idea is as follows: The first button does not act through the form field, it serves to open a modal that is part of the researcher’s assistance. And the second button is that acts with the code that is inserted in the form field, will open a page to play the campaign whose code is indicated in the field.
If anyone can help I really appreciate!
<input color="red" class="tftextinput3" type="text" id="searchresultsquery" class="searchTerm" placeholder="Pesquise promoções ou indique um betcode e clique play. Boa-sorte?" autofocus name="q" title="" required="required"/>
<button type="submit" src="https://www.clubesorte.org/c_elements/img/logos/logo_pesquisar02.png" class="searchButton2" >
<i id="fa-search" class="fa fa-search"></i>
<button type="submit" src="https://www.clubesorte.org/c_elements/img/logos/logo_pesquisar02.png" class="searchButton" >
<i id="fa-search" class="fa fa-play"></i>
I can put or change the warning message with this code: oninvalid="this.setCustomValidity('Search active campaigns')"... inserted in the imput of the form/search field, but I wanted to insert a message like this when you click on the two buttons and each one with a different message.
– Meireles
If the first btn is not to send it should be a button type button, and not type Submit
– hugocsl
Hi! Thanks for the suggestion, I hadn’t thought about it. I already changed, and as this button will open a modal related to the search do not need to put warning.
– Meireles