<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/submitScope(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE11submitScopeyQrSbF"
  },
  "title" : "submitScope(_:)"
}
-->

# submitScope(_:)

Prevents submission triggers originating from this view to invoke
a submission action configured by a submission modifier higher up
in the view hierarchy.

```
nonisolated func submitScope(_ isBlocking: Bool = true) -> some View
```

## Parameters

`isBlocking`

A Boolean that indicates whether this scope is
actively blocking submission triggers from reaching higher submission
actions.

## Discussion

Use this modifier when you want to avoid specific views from initiating
a submission action configured by the [`onSubmit(of:_:)`](/documentation/SwiftUI/View/onSubmit(of:_:)) modifier.
In the example below, the tag field doesn’t trigger the submission of
the form:

```
Form {
    TextField("Username", text: $viewModel.userName)
    SecureField("Password", text: $viewModel.password)

    TextField("Tags", text: $viewModel.tags)
        .submitScope()
}
.onSubmit {
    guard viewModel.validate() else { return }
    viewModel.login()
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)