The context is for the purpose of detecting when someone has made changes to some piece of information (like account information). I use this to enable/disable the save button, show tooltips etc.
The idea is to use the :minus list operator against 2 text lists. One list the saved values, the second list will be current input’s values. If the count is more than 0 then it means that there has been a change. You can use Arbitrary texts:split by() to create the text lists.
I’ve tried many methods like setting states and stuff but this takes is the simplest and tidiest way to do it natively IMO. The lists do not have to be in the same order since :minus list doesn’t take that into account. You can insert the expression into a group as a yes/no value and refer to that group’s value if you want to use it in other conditions. Now you only need to manage 1 expression instead of multiple.
I use this for some testing, so it may go away at some point…
I use this as a function to then send a javascript yes/no to another resuable to enable the submit button incase you wondering what this does in my case.
Note: you can’t use ‘is valid’ as a condition, because this only checks when the inputs actually got a value to check IF its valid against how youve set the field entry (number, text, email, shouldnt be empty etc).
Thanks for bringing it up. There is that weird issue where blank fields will cause false positives. I’ve actually made a plugin for myself to make things easier.
Works the same way as you would in this thread but it’s handled by a simple JS script. Makes expressions implementation and revision easier. Hope it helps!
Disclaimer, I’m new to Bubble plugin building and I use AI to help me script cause I hate writing code.