It seems like there's no way to set a placeholder in a text field when it is in a form on macOS. This is not an issue on iOS.
import SwiftUI
struct ContentView: View {
@State private var textUp = ""
@State private var textDown = ""
var body: some View {
VStack {
Form {
Text("In a form:")
.fontWeight(.bold)
TextField("placeholder", text: $textUp)
}
Text("Not in a form:")
.fontWeight(.bold)
TextField("placeholder", text: $textDown)
}
.padding()
}
}
Am I missing something or is this just not supported?