I have a formTemplate and when the user starts typing, the keyboard opens on the iPhone for faster typing. How can I make the button in the formTemplate triggered by the "iphone Enter button"? Is there any eventListener or similar?
function emailTemplate() {
var template = "
<document>
<formTemplate>
<banner>
<description>Enter email for access</description>
</banner>
<textField id='email' keyboardType='emailAddress'>Your email</textField>
<footer>
<button>
<text>Submit</text>
</button>
</footer>
</formTemplate>
</document>
";
var templateParser = new DOMParser();
var parsedTemplate = templateParser.parseFromString(template, "application/xml");
var loading = loadingTemplate();
loadingScreen);
pushPage(parsedTemplate, loading);
var email = parsedTemplate.getElementById("email");
parsedTemplate.addEventListener("select", function() { submit(email); });
}
function submit(textField) {
var keyboard = textField.getFeature('Keyboard');
var email = keyboard.text;
}