How do i return the value of the button clicked in a button bar?
-
In the configuration of the button, you can assign a value, e.g. submit.
This value is assigned to the .result of the form and can be tested with an expression like the following:
=$form1.result === "submit"0 -
I got that to work. Thank you for that. I am also trying to retrieve the values of buttons from a button bar that I have added to my form. It does not seem to work the same way as the "footer" button bar. Do you know how to get those types of values? Thanks.
0 -
If your buttons have values, and cause the form to submit, then you can get the value the way Nico described.
But if your button bar has a "Click" event, then clicking the buttons won't submit the form. In that case, you can use the Get Form Event Data activity inside the click event. eg.
- $getFormEventData1.value tells you the value of the button that caused the click event
- $getFormEventData1.itemId tells you the id of that button within the button bar (0 for the first button, 1 for the second, etc)
0 -
Thank you.
0 -
@Amanda Frech? great answer. thanks Amanda.
0 -
You could also capture the value of the button clicked if it has a value with =$form1.event.value
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
6 Kommentare