I've set up a form to choose either hotel or camping using radio buttons. I then have a dropdown that appears asking how many rooms are required or camping pitches, depending on what radio button is selected. These are priced and calculated automatically, but I've hit a problem that I can't get my head around.
If someone selects hotel and then two rooms it adds up fine, but if they change their mind and select camping I need the two selected hotel rooms to reset to null - currently if a camping pitch is selected it adds it to the total of two hotel rooms.
Hopefully that makes sense and someone can help with the calculations necessary?