Have a button change from saying “Add Answer” to “Update” after it is clicked.
This button is in a repeating group.
How can I achieve this?
My approach right now is to have two different buttons, one visible and the other not visible, and then have them flip flop visibility once the “Add Answer” button is clicked.
This seems the best approach as I’m not able to store a condition in the Custom State of the button if I create one because in both the workflow and conditions for the button I can’t get at the Custom State to do something based on its value.
Doesn’t work. There isn’t a “clicked” condition. There is a “pressed” condition and that only temporarily changes the text until the user let’s go of the button (releases their mouse click).
There are other posts on here trying to achieve the same simple, basic thing and there isn’t a straight forward way to do this. Then trying to do it my way also isn’t simple to figure out.
The user can click “Add an answer” and this brings up a popup (or something) that lets the user add their answer.
Once they save their answer, you want the button to now say “update” which will let the user update their answer.
Is this close?
If so, this might work.
Set a condition on the button to do a search to see if the user added an answer to that specific question (the question being the one in that particular RG’s cell).
If true, then set the text of the button to “update”.
If false (meaning the user hasn’t added an answer), set the text of the button to “Add an answer”.
Would that work?
EDIT: Of course you’ll need to check which “button” you’re displaying in order to let the user add or update an answer, but that’s pretty straightforward as well.