input: def submit_form_with_city(event):
      """
      This function prevents the default form submission, captures the user's city input,
      and then submits this data to the server using the Fetch API.
      
      :param event: The event object from the form's onsubmit handler
      :return: None
      
      Example:
      When the form with id 'myForm' is submitted with the city 'London', the function will:
      1. Prevent the form from submitting via the browser's default action.
      2. Capture the city input 'London'.
      3. Send a POST request to '/my-api/submit-form' with the city data.
      4. Log the server's response to the console.
      """
output:     event.preventDefault()
      city = event.target.elements['city'].value
      fetch('/my-api/submit-form', {
          method: 'POST',
          headers: {
              'Content-Type': 'application/json'
          },
          body: JSON.stringify({ city: city })
      })
      .then(response => response.json())
      .then(data => console.log(data))
      .catch(error => console.error('Error:', error));