18
Views
6
Comments
Solved
Update element from list on press enter
Application Type
Reactive

Hi everyone,

I have a list of items. Each item has an input. When the user clicks enter, the record in the database should update. How can I achiev it?

2025-12-22 13-50-43
Sherif El-Habibi
Champion
Solution

Hello,

You can add this script in the OnReady event. It takes the ID of the input you want to target (in your case, the current input of the list). It adds a keydown event listener that checks if the pressed key is Enter. If true, call your update action using $actions.YourUpdateAction including any required input parameters.

UserImage.jpg
Łukasz Kaproń


how to pass the ID of each element?

2025-12-22 13-50-43
Sherif El-Habibi
Champion

In the case of a List, you won’t be able to reliably detect the widget ID. What you can do instead is add a dummy CSS class, for example .enter-input, which is bound to the list of inputs.

You can then retrieve and handle these inputs using that class in a JavaScript node.

Why not use the input class itself? To avoid overriding or affecting all inputs in the rest of the screen or the application as a whole.


 

2024-10-05 13-30-20
Huy Hoang The
Solution

Hi @Łukasz Kaproń , u can add specify class (Ex: activity-input), after that u add this JS into OnReady to handle each input on list. 

Hope this is helpfull!

Huy Hoang.

2025-12-22 13-50-43
Sherif El-Habibi
Champion
Solution

Hello,

You can add this script in the OnReady event. It takes the ID of the input you want to target (in your case, the current input of the list). It adds a keydown event listener that checks if the pressed key is Enter. If true, call your update action using $actions.YourUpdateAction including any required input parameters.

UserImage.jpg
Łukasz Kaproń


how to pass the ID of each element?

2025-12-22 13-50-43
Sherif El-Habibi
Champion

In the case of a List, you won’t be able to reliably detect the widget ID. What you can do instead is add a dummy CSS class, for example .enter-input, which is bound to the list of inputs.

You can then retrieve and handle these inputs using that class in a JavaScript node.

Why not use the input class itself? To avoid overriding or affecting all inputs in the rest of the screen or the application as a whole.


 

2024-10-05 13-30-20
Huy Hoang The
Solution

Hi @Łukasz Kaproń , u can add specify class (Ex: activity-input), after that u add this JS into OnReady to handle each input on list. 

Hope this is helpfull!

Huy Hoang.

2026-01-28 16-57-48
Mihai Melencu
Champion

Hi Lukasz,

If you want to avoid using JavaScript, you can wrap the input inside a form and add a button that triggers the action. Set the button’s Is Form Default property to True.

2023-10-16 05-50-48
Shingo Lam

correct, this one is the built-in logic for the form. We are doing low-code, avoid coding all the time 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.