For submit form when type is cycling we need elevation input, but when type is cycling and page reload, type is cycling and we have cadence input which is incorrect.
I added last three line code to fix problem.
It is my solution :
_showForm(mapE) {
// receive and store data about coords that user clicked
this.#mapEvent = mapE;
form.classList.remove('hidden');
inputDistance.focus();
// reset inputs to initial value
inputCadence.closest('.form__row').classList.remove('form__row--hidden');
inputElevation.closest('.form__row').classList.add('form__row--hidden');
inputType.value = 'running';
}
First of all thanks for this fantastic course ♥.
For submit form when type is cycling we need elevation input, but when type is cycling and page reload, type is cycling and we have cadence input which is incorrect.
I added last three line code to fix problem. It is my solution :