Closed j0hnw0rk3r closed 2 years ago
Hi @j0hnw0rk3r,
Thanks for creating this issue. Let me assign @Rick-Kirkham to answer.
Also, I noticed you asked this question on multiple repos (https://github.com/OfficeDev/Office-Add-in-samples/issues/276 and https://github.com/OfficeDev/office-js-snippets/issues/601). Since the same team monitors all of them, I'm going to close the others as duplicates. This will help ensure a consistent answer than can be found by people searching later.
Thanks you for your quick response @AlexJerabek
@j0hnw0rk3r We use this repo to track problems with the documentation. Programming questions like this are best asked on Stack Overflow. In your case, you want to toggle the button label whenever the button is pushed. This is a common web application scenario, so it has no particular connection with Office Add-ins. The standard way to do this is to have the handler for the button click event change the button label. The best way to do this would depend on whether you are using vanilla JavaScript or a framework like React or jQuery.
I will close this issue for now, but you can still add comments to it, and you can request that it be reopened.
Article URL
N/A
Issue
I developed an add-in built with yo generator (Node.js) that works as a configurator which enables the outlook compose to enable/disable sending a copy of the new email to a custom url on-send.
There's a control button added that says 'Toggle Send to cCRM' but I would prefer a toggle text dynamically from 'Enable send to cCRM' to 'Disable send to cCRM' and vice-versa when clicking the control button to improve UI experience. Is it possible to accomplish?