Hi all, looking for a solution to a workflow that I would have thought to be quite simple, though havent been able to work out.
If I have an input field for pickup and for dropoff location, how can I switch the locations into the opposing input so the original pickup is now showing as the dropoff location and vice versa.
I dont want this to have an effect on the database but only appear front end for users who are inputting commute details. The change to the database will occur after saving all details. I attempted to do so using custom states but for whatever reason couldnt work it out.
Thanks
One is creating x2 states both being a geographic address. One called Pickup Current value and one Dropoff current value. Then hyperthetically what I thought could work would be that upon pressing a swap button, those two states are filled with the current values of the relevant input fields, and then the input fields would take on the opposite values from the state…meaning the dropoff input would now take on board the value from the state, ‘Pickup Current value’.
I’m sure there is a much simpler way though cant work it out…
I meant to reply yesterday, but had a lot in hand & didn’t manage to get back to you.
This video Reorder/Swapping Values will show you the swapping part, but you’ll have to adjust according to your needs. It does work as I have done it myself in my current project. The idea is there. You just have to tweak it accordingly.