Disable button on modal widget after use

Hello, is anyone know? is it possible to make the button on modal widget only can be used once?

This topic has been moved from Tutorial & Course Discussions to Programming & Scripting.

When posting, please review the categories to ensure your topic is posted in the most relevant space.