Input.Toggle valueOn - valueOff makes no sense
Input Toggle enables the user to specify if the valueOn property is either a True or False value. The issue with this is that the valueOff can be set to exactly the same value.
As a Toggle is being presented as a CheckBox, these two properties should be removed and the traditional IsChecked property to denote that it is on or off
Hi there, the original intention for valueOn and valueOff was used with the Action.Http action (which we've since removed from v1.0). It offered a light-weight binding syntax to make an arbitrary HTTP POST to a URL. If the HTTP payload required a specific value to be sent, this allowed the card author to customize what value was sent to the third-party, by using the valueOn and valueOff properties.
It has somewhat less value now given Action.Submit, but it still allows a card author to customize what value gets sent back to them based on the checkbox being selected or not.
Maybe we should get rid of the value property then and replace that with isChecked? Cause it makes things tricky such that when setting value, you have to make sure it corresponds to your valueOn value you specified...
For example if I initially had a toggle that I wanted default checked, I would do the following...
{
"type":"Input.Toggle",
"id": "acceptTerms",
"title": "I accept the terms and agreements",
"value": "true"
}
And then later on if I decided to utilize the valueOn and valueOff properties, I would add those...
{
"type":"Input.Toggle",
"id": "acceptTerms",
"title": "I accept the terms and agreements",
"value": "true",
"valueOn": "accepted",
"valueOff": "rejected"
}
But now my checkbox is no longer checked by default! I have to remember to update the value property since I changed the valueOn property... it's an odd and unnecessary dependency.
Additionally, the way it is now makes the booleans inconsistent with the rest of the booleans, since if you're just using the default true/false, you have to use quotes around true, since it's of type string.
{
"type":"Input.Toggle",
"id": "acceptTerms",
"title": "I accept the terms and agreements",
"value": "true"
}
Whereas textblocks use booleans and therefore don't have those quotes around true...
{
"type":"TextBlock",
"text": "This is some text",
"isSubtle": true
}
Correct - see issue #784
Heads up - I've built a designer for Adaptive Cards which I will release shortly. This is where in the traditional sense - what I call a paradox bool - can create a logic bug. It isn't so much apparent when you are creating a card declaratively, but when you build out this property dynamically, it can be a mess to trace as to why a value of (string) bool set to True is yielding a False value.

That's awesome! I'll work on getting the schema updated. I'd also love to hear more about the designer, feel free to reach out to [email protected] if you want to share details 😃
Closing as unlikely we'll make any changes to the schema at this point