Reputation: 225
I would like to submit information to my email from my app when I press a button. Is there a form option like in HTML? Can you insert HTML in react native? Sorry if this is terrible question I'm still learning a lot of it.
Upvotes: 2
Views: 632
Reputation: 4879
Use Linking.
Linking.openURL('mailto:[email protected]?subject=hello&body=body')
Example
<TouchableOpacity
onPress={() => {
Linking.openURL('mailto: [email protected]?subject=hello&body=body');
}}
<Text>[email protected]</Text>
</TouchableOpacity>
Change subject and body to yours in example.
Upvotes: 1
Reputation: 597
Look into the TextInput
component - there are definitely existing ways in react-native to submit information like as a form in html. There are even some libraries that help you do it!
Upvotes: 0