Gravity form Change value of quantity based on previous field selection
Gravity form Change value of quantity based on previous field selection Hi I am using Gravity Form, and I am trying to build a form where depending on the service you choose, the quantity of hours will update automatically. For example: Multiple choice field: 1. Wash a car 2. wash a truck 3. wash a motorbike Quantity field should pre-populate with either; 1 (if motorbike is selected, or 2 (if car is selected or 3 (if truck is selected) Any help is much appreciated 1 Answer 1 A generous developer I know helped me out. Add this code after the form. here is the answer: <script type="text/javascript"> var helpSelect = document.querySelector('#input_2_22') var quantityInput = document.querySelector('#input_2_28') helpSelect.addEventListener('change', function (e) { quantityInput.value = e.target.value }) </script> Remember to change the input id to the id o...