I was wondering is there any possible way that I can have a webview that automatically inputs the values for text boxes on a website and submit so that the user can just byp
Yes, you can use the following javascript to fill out the form then submit it.
//Set the values
NSString* firstValue = @"first value here";
NSString* secondValue = @"second value here";
// write javascript code in a string
NSString* javaScriptString = @"document.getElementById('nameOfOneInput').value=%@;"
"document.getElementById('nameOfAnotherInput').value=%@;"
"document.forms['nameOfForm'].submit();";
// insert string values into javascript
javaScriptString = [NSString stringWithFormat: javascriptString, firstValue, secondValue];
// run javascript in webview:
[webView stringByEvaluatingJavaScriptFromString: javaScriptString];
You obviously have to set firstValue
and secondValue
first.