Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force flush a user's input?

I was wondering if it is possible to force flush of a user input from a script.

The context is the following : I have a sheet in which people are supposed to input data, and a button where they click when they are done, which will process the data.

It happens that sometimes people double click a cell, write what they want, but then they click the button before hitting return. Thus the script sees the cell as still empty.

Would there be a way to either force flush with what they have currently typed, or detect that a cell is currently being edited ?

like image 752
Vic Seedoubleyew Avatar asked Sep 14 '25 03:09

Vic Seedoubleyew


1 Answers

The cell is never "edited" until they press enter, or select another cell. So you could instruct them click another cell, or press enter before clicking the button. I understand that this is not the best solution. But there is no way to detect what the user is about to enter in the cell.

You could make it a menu option that they click. Clicking on a menu item (see addMenu) writes the text to the spreadsheet so that you will be able to read it when they use their menu function. Again, this may not be the best solution, but it is a solution, nonetheless.

like image 191
Phil Bozak Avatar answered Sep 17 '25 02:09

Phil Bozak