I have a repeating group and each row contains an Input text box. Ultimately, I want to be able to click the ‘Submit’ button, to save all the entries to the database, but I don’t want this to be saved until the ‘submit’ button is clicked. The only way to do this is by using one or more states. I thought I could create a workflow that says: “When This Input is changed, add this input’s value to XYZ state.” but that doesn’t work because I also need to remove the previous value - which I can’t really get a hold of because there is no workflow trigger for “when an input is clicked/active” (when an element is clicked only works for buttons and text).
If the user changes Input 1, and I add that to a list, and then changes Input 1, the list will have the original value and the updated value. To solve that, I thought if I store the input value in it’s own state, I can remove it when the input is changed, but because I have multiple inputs, this strategy will remove the input that is last changed, not the input value for the currently active input box. In other words, if I type in ‘abcd’ into Input 1 (which is saved into “TempState”), then type in ‘1234’ into Input 2 (which overwrites “TempState” with ‘1234’), and then change Input 1 to ‘abcdef’, then ‘1234’ will get removed from “TempState”, but I want to remove ‘abcd’ and replace it with ‘abcdef’
Anyone have any suggestions?