Make a button initially not visible

My goal:

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.

No need for 2 buttons…

Just add a condition to the button (based on whatever it is you’re referring to) to change what it says…

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.

It’s actually very straight forward (I already explained how to do it…)

But without knowing exactly what you’re trying to do I can’t be any more specific than that…

Maybe give a specific example…

1 Like

Is this what you want to do?

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.

I think I need to go with my original plan. They’re in a repeating group. I think that’s the issue.

My goal:

Have a button change from saying “Add Answer” to “Update” after it is clicked.

If you literally mean that you want to change the Button Text from “Add Answer” to “Update” after the button has been clicked, then it’s dead simple…

  • Just add a custom state to the button (“Is Clicked”: yes/no, default value “no”)

  • Add a condition to the button so that when ‘This Button is Clicked’ change the text to say “Update”

  • Add a workflow event when the button is clicked with an action to set the state of the button (Is Clicked) to Yes

It’s that simple…

Saying that, I rather doubt that is what you’re trying to do, as that wouldn’t make much sense from a UX point of view…

I suspect what you actually want to do is apply the condition on the button based on some database value…

…in which case, just use that as your condition instead of the button’s ‘Is Clicked’ state value…

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.