button to increment a numeric field

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
henryejune
Posts: 6
Joined: 2022-05-26 07:37

button to increment a numeric field

Post by henryejune » 2022-05-27 16:05

good morning everyone.
How Is it possible to insert a button next to a numeric field to increment the value of the field by 1

For example, i have to setting the number of persons renting a room:

tablename:
room.

field:
id
n_person.

I would like a button next to the field 'n_person' which adds 1 to the number of persons each time i click it.


Thanks.
Sergio

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: button to increment a numeric field

Post by pbottcher » 2022-05-29 20:45

Hi,

can you provide some more details? Is the n_person field a readonly field, or why do you need a button next to the field to increment it by one?
Would changing the field type to numeric solve your question?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

henryejune
Posts: 6
Joined: 2022-05-26 07:37

Re: button to increment a numeric field

Post by henryejune » 2022-05-30 20:15

HI, I have a form where I record the activities done with patients in a month. So for example if they do 1 interview they add 1 to the interview field. This way would be the fastest way because the operators use mobile phones and activating the keypad or dropdown is not optimal. After seeing 1 patient they enter the monthly activity form and add by clicking on the buttons to add the activity. A bit like when you have to book a room and they ask you to indicate the number of people. Usually there are these fields with a + to add 1 person each time you click. If you have a mobile phone this is the optimal way. Then the field is a number field. But I would like it to be able to be incremented by 1 each time I click the button that is next to the field. Is it possibile with appgini hooks? thanks.

Post Reply