Question On Clicking on the Enter Button on KeyBoard Need to Search the Search Fields

Hello, I have Used 3 Different types of Search Field in Single Screen eg(Name,UseerName,Email) am Doing the search action on one Button .But I need to have While am Typed  in the Search Field and Clicking the Enter Button on Keyboard the action Should perform Any one Help Me out Here...

Thanks Regards

Ramesh Pugazhenthi.

Hi Ramesh,

It is a bit unclear what you try to achieve.

What I think to understand is that the search action should be performed when pressing the enter button?

Are you creating a traditional or reactive web app?

For traditional web app just set the Is default property of the search button to true.

For reactive web app, to set the IS default property to true you have to put the search button in a form widget.

Regards,

Daniel

ramesh puzhalenthi wrote:

Hello, I have Used 3 Different types of Search Field in Single Screen eg(Name,UseerName,Email) am Doing the search action on one Button .But I need to have While am Typed  in the Search Field and Clicking the Enter Button on Keyboard the action Should perform Any one Help Me out Here...

Thanks Regards

Ramesh Pugazhenthi.

Hi Ramesh can you upload some pics to help to understand your case or perhaps upload the oml?


ramesh puzhalenthi wrote:

Hello, I have Used 3 Different types of Search Field in Single Screen eg(Name,UseerName,Email) am Doing the search action on one Button .But I need to have While am Typed  in the Search Field and Clicking the Enter Button on Keyboard the action Should perform Any one Help Me out Here...

Thanks Regards

Ramesh Pugazhenthi.


Hi,


Yes you can call JS,


// Get the input field
var input = document.getElementById("myInput");

// Execute a function when the user releases a key on the keyboard
input.addEventListener("keyup", function(event) {
  // Number 13 is the "Enter" key on the keyboard
  if (event.keyCode === 13) {
    // Cancel the default action, if needed
    event.preventDefault();
    // Trigger the button element with a click
    document.getElementById("myBtn").click();
  }
});