Page 1 of 1

button to increment a numeric field

Posted: 2022-05-27 16:05
by henryejune
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

Re: button to increment a numeric field

Posted: 2022-05-29 20:45
by pbottcher
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?

Re: button to increment a numeric field

Posted: 2022-05-30 20:15
by henryejune
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.