Post more than one value
- ❤️1
You could create a variable of type object and say you call it "person " . When you create it , you can set the keys name = empty and email = empty . Then on your name input element you can set an event (I use the input event ) and in the formula editor , use the set node to set the name key of the person object to whatever value is emitted from the element They will all be passed at the same time if they 're part of the object "userColor " . The principle remains the same . You just set events on each of the input elements such that when the input of color1 is changed , an event sets the "color 1 " key for the "userColor " object to whatever was in that input . Then when the user clicks and selects a color for input color2 element , an event on that element sets the "color 2 " key for the userColor object and so on . Basically , you 're simply building the object (and each of it 's keys ) to the colors from each of the three inputs and then passing that "userColor " object as the body of the API request . The "userColor " object will be sent as one thing - - it just so happens to have three sub -items within it that can be extracted by your backend . Maybe it is an issue because all values have the same key ? Yes , that is why . Try setting unique keys (color1 , color2 , color3 ) . Also , the way you set up the initial object is fine - - you 're assigning each key with an initial value . But when you want to modify the value of a key , say the 'color1 ' key of you should use the set node to set the key in an object . In the image (1 ) Sets the object ( "person " ) whose value I want to edit (2 ) In the formula editor , I set what I want it to be set to . But "person " isn 't a primitive - - its an object - - it has more stuff inside it that (3 ) I need to use the set node to modify . In the set node , I indicate the path (key ) , I want to set inside this (person ) object - - the key or path is 'name ' and (4 ) I set the 'name ' to the value emitted by the input element .