         return true
     }
     
+    // Append a "%" sign to the end of the string in the textfield
+    func weightFieldTextChanged(textField: UITextField) {
+        
+        guard var text = textField.text, text != "" else {
+            return
+        }
+        
+        // Replace all % and treat string as if the % doesnt matter
+        text = text.replacingOccurrences(of: "%", with: "")
+        // If it's a back space then remove that string and set the field
+        if isBackspace {
+            text = text.substring(to: text.index(before: text.endIndex))
+        }
+        
+        // If after deleting the text = "" then just set textfield text to empty, and return 
+        // We dont want to append just % because that would look weird, so return and dont append
+        if text == "" {
+            textField.text = nil
+            return
+        }
+        
+        // All statements passed, lets set the textfields text
+        textField.text = text.appending("%")
+        
+    }
+    
     override func layoutSubviews() {
         // Remove these views and redraw them
         nameField.removeFromSuperview()

    }
    
    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
        // Dont allow multiple periods, anything below 0 or above 100
        if textField === weightField {
            let newChars = CharacterSet(charactersIn: string)
            let isNumber = CharacterSet.decimalDigits.isSuperset(of: newChars)
            if isNumber {
                let current = textField.text! + string
                let num = Double(current)
                if let n = num,  n > 100.0 || n < 0.0 { return false }
            } else { // Allow only one decimal
                if string == "." {
                    let current = textField.text! + string
                    let num = Double(current)
                    let count = textField.text!.components(separatedBy: ".").count
                    if count > 1 { return false }

        weightField.returnKeyType = .done
        weightField.isHidden = true
        weightField.delegate = self
        weightField.addTarget(self, action: #selector(self.weightFieldTextChanged), for: .editingChanged)
        weightField.keyboardType = .decimalPad
        
        // Add an input accessory view which will display done
