223
Views
8
Comments
Solved
I want to execute the action only once, even if I press the submit button repeatedly
Question

Hello.

I would like to deal with the case where the button is pressed multiple times when sending user information.


I wrote a Java script, but if you press the button multiple times, records for that number of times will be registered.


How can I perform an action only once, no matter how many times I press the button?


java sclipt??????????????

2021-08-12 11-00-27
Nordin Ahdi
 
MVP
Solution

Hi Akari,

There are a few components available on the Forge that I believe include the functionality you are looking for.

Hope this helps!

Regards,

Nordin

UserImage.jpg
Akari Ukai

Nordin Ahdi wrote:

Hi Akari,

There are a few components available on the Forge that I believe include the functionality you are looking for.

Hope this helps!

Regards,

Nordin

 

 I am able to solve it thanks to you.

The first Forge.

Thank you very much! !

2022-02-07 08-52-30
Pranav Pandey

Hi Akari Ukai,

You can use a variable to count the number of clicks and restrict the logic call .

2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Akari,

If you want to make the button to ReadOnly mode 

Steps:

1) Define a Boolean variable under screen scope

2) Bind the variable to the Button Enabled property

3) Update the local boolean variable value on the button click action flow

4) Ajax refresh the button

Hope this helps you!


Regards,

Benjith Sam

2021-08-12 11-00-27
Nordin Ahdi
 
MVP
Solution

Hi Akari,

There are a few components available on the Forge that I believe include the functionality you are looking for.

Hope this helps!

Regards,

Nordin

UserImage.jpg
Akari Ukai

Nordin Ahdi wrote:

Hi Akari,

There are a few components available on the Forge that I believe include the functionality you are looking for.

Hope this helps!

Regards,

Nordin

 

 I am able to solve it thanks to you.

The first Forge.

Thank you very much! !

2020-08-03 07-48-23
Akif Arfien

Hi Akari,

I think the best way to do this is to use two local variable to check : If clicked and Once clicked.

Please see the screenshots.


I hope this will help you :)

Good day.



demo.oml
2026-03-20 01-28-51
Saugat Biswas

Hi Akari,

I have a simple solution I had used in my projects.

Assign a dummy style (jsSubmitForm in the example below) to the button and on onclick event use the below JavaScript (baiscally jQuery)

"$('.jsSubmitForm').attr('disabled','true');"

The dummy style name is used to identify the widget by classname in the jQuery.

I am sure this will help resolving your issue. 

Regards,

Saugat

2021-08-12 11-00-27
Nordin Ahdi
 
MVP

You're welcome Akari, I'm glad I could help!

2019-09-24 18-41-25
Jorge Martins
 
MVP

Just as an add-on to the answers provided here, and for people that land here looking for a solution to this in Reactive Apps, OutSystems UI provides the Loading Button pattern that supports this same scenario.

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