-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSupplierForm.swift
39 lines (32 loc) · 1.21 KB
/
SupplierForm.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import SwiftUI
import Northwind
struct SupplierForm: View {
@Binding var supplier : Supplier
var body: some View {
Section("Supplier Information") {
TextField("Supplier Name", text: $supplier.companyName)
TextField("Address", value: $supplier.address,
formatter: .emptyIsNull)
TextField("City", value: $supplier.city,
formatter: .emptyIsNull)
TextField("Region", value: $supplier.region,
formatter: .emptyIsNull)
TextField("Postal Code", value: $supplier.postalCode,
formatter: .emptyIsNull)
TextField("Country", value: $supplier.country,
formatter: .emptyIsNull)
}
Section("Supplier Contact") {
TextField("Contact Name", value: $supplier.contactName,
formatter: .emptyIsNull)
TextField("Contact Title", value: $supplier.contactTitle,
formatter: .emptyIsNull)
TextField("Phone", value: $supplier.phone,
formatter: .emptyIsNull)
TextField("Fax", value: $supplier.fax,
formatter: .emptyIsNull)
TextField("Homepage", value: $supplier.homePage,
formatter: .emptyIsNull)
}
}
}