 			return true
 		}
 	}
+	
+	public func timerUpdate() {
+		invalidateTimer()
+		//SwiftyFormLog("timer update")
+
+		let s = textField.text ?? ""
+		_ = validateAndUpdateErrorIfNeeded(s, shouldInstallTimer: false, checkSubmitRule: false)
+	}
+
+	public func reloadPersistentValidationState() {
+		invalidateTimer()
+		//SwiftyFormLog("reload persistent message")
+
+		let s = textField.text ?? ""
+		_ = validateAndUpdateErrorIfNeeded(s, shouldInstallTimer: false, checkSubmitRule: true)
+	}
+
+	
+	// MARK: UIResponder
+	
+	public override var canBecomeFirstResponder : Bool {
+		return true
+	}
+	
+	public override func becomeFirstResponder() -> Bool {
+		return textField.becomeFirstResponder()
+	}
+	
+	public override func resignFirstResponder() -> Bool {
+		return textField.resignFirstResponder()
+	}
+	
+}
+
+extension TextFieldFormItemCell: UITextFieldDelegate {
+	public func textFieldDidBeginEditing(_ textField: UITextField) {
+		updateToolbarButtons()
+	}
 
 	public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
 		let textFieldString: NSString = textField.text as NSString? ?? ""

	}
}

public class TextFieldFormItemCell: UITableViewCell, UITextFieldDelegate, CellHeightProvider {
	public let model: TextFieldFormItemCellModel
	public let titleLabel = UILabel()
	public let textField = CustomTextField()

		let valid = validateAndUpdateErrorIfNeeded(s, shouldInstallTimer: true, checkSubmitRule: false)
		return valid
	}

	// Hide the keyboard when the user taps the return key in this UITextField
	public func textFieldShouldReturn(_ textField: UITextField) -> Bool {
		let s = textField.text ?? ""
		let isTextValid = validateAndUpdateErrorIfNeeded(s, shouldInstallTimer: true, checkSubmitRule: true)
		if isTextValid {
			textField.resignFirstResponder()
		}
		return false
	}
}

extension TextFieldFormItemCell: CellHeightProvider {
	public func form_cellHeight(indexPath: IndexPath, tableView: UITableView) -> CGFloat {
		let sizes: TextFieldFormItemCellSizes = compute(bounds.width)
		let value = sizes.cellHeight
		//SwiftyFormLog("compute height of row: \(value)")
		return value
	}
}
