function onProfileSubmit(e) {
  e.preventDefault();
  // Check that the user entered a message and is signed in.
  if ((ageInputElement.value || sexInputElement.value|| yearlyGoalInputElement.value || countyInputElement.value ) && checkSignedInWithMessage()) {
    saveProfile(ageInputElement.value, sexInputElement.value,yearlyGoalInputElement.value, countyInputElement.value).then(function () {
      hideProfile();
    });
  }
  getProfile();
}
// Triggered when the send new message form is submitted.
Triggered when the send new message form is submitted.
Triggered when the send new message form is submitted .
function onProfileSubmit(e) {
  e.preventDefault();
  if ((ageInputElement.value || sexInputElement.value|| yearlyGoalInputElement.value || countyInputElement.value ) && checkSignedInWithMessage()) {
    saveProfile(ageInputElement.value, sexInputElement.value,yearlyGoalInputElement.value, countyInputElement.value).then(function () {
      hideProfile();
    });
  }
  getProfile();
}
function onProfileSubmit ( e ) { e . preventDefault ( ) ; if ( ( ageInputElement . value || sexInputElement . value || yearlyGoalInputElement . value || countyInputElement . value ) && checkSignedInWithMessage ( ) ) { saveProfile ( ageInputElement . value , sexInputElement . value , yearlyGoalInputElement . value , countyInputElement . value ) . then ( function ( ) { hideProfile ( ) ; } ) ; } getProfile ( ) ; }
Triggered when the send new message form is submitted.
Triggered when the send new message form is submitted .
// Check that the user entered a message and is signed in.