Phonegap - email html form content - android

I have the below HTML code which basically sends mail on click of submit button
<form action="mailto:xxx#gmail.com" method="post" enctype="text/plain">
Name:<br>
<input type="text" name="name" value="Name"><br>
E-mail:<br>
<input type="text" name="mail" value="E-Mail"><br>
Comment:<br>
<input type="text" name="comment" value="Comments" size="50"><br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">
</form>
when I hit the submit button in the phonegap application I get the below in the logcat.
DroidGap: GapViewClient.onReceivedError: Error code=-10 Description=net::ERR_UNKNOWN_URL_SCHEME URL=mailto:xxx#gmail.com?body=name%3Dyour%20name%0D%0Amail%3Dxxx%40gmail.com%0D%0Acomment%3Dyour%20comment%0D%0A
I am not able to resolve this issue. Any suggestions or help would be appreciated.

I think you should use email composer Plugins to send email.
SMSComposer plugin

Related

Responsive HTML - How to show a `Go` button instead of `Next` on mobile keyboard

Ive a simple problem, Ive a form that submits on enter on any field. However, on a mobile input type=text for example doesnt show a Go or submit key on the keyboard.
Instead it shows or does a next and takes the user to next input field. Only the last field shows the Go key.
Is there a way to get this working?
Here is the html:
<form action="" method="POST">
<input type="text" id="field_1" name="field_1" value="" />
<input type="text" id="field_2" name="field_2" value="" />
<input type="text" id="field_3" name="field_3" value="" />
</form>
Thanks a lot

How can i submit form from android?

I am submitting form using html and now i have to create a form in android that will send message from textbox same as the website.
I don't want to use webview.
here is my html code:
<form action="http://example.com/form/" method="post">
<input type="text" name="name"/>
<input type="text" name="email" placeholder="Email Address" />
<textarea name="message" placeholder="Type your Message"></textarea>
<input type="submit" value="Send" />
</form>
Thanks

HTTP Post Form Data With Fields That Already Have Values

I am attempting to add a native login for a Jasig CAS to my Android app. I am using OkHttp (and/or RetroFit) to perform the HTTP post operation. The HTML login form looks like this:
<form id="form1" name="login" class="fm-v" action="/cas/login" method="post">
<input type="hidden" name="lt" value="LT-{login ticket}">
<input type="hidden" name="execution" value="{execution value}">
<input type="hidden" name="_event" value="submit">
<input type="text" id="username" name="username" tabindex="1"
placeholder="Username" class="textfield" autocomplete="off">
<input type="password" id="password" name="password" tabindex="2"
placeholder="Password" class="textfield" autocomplete="off">
<input type="submit" id="submit" name="submit" tabindex="3"
class="button" value="Submit">
</form>
From what I understand the "POST" method when added to the URL looks something like this:
"url.base.com/extension?post_name=post_value&..."
So I have found that when I use either OkHttp or RetroFit, the post method uses a URL like this:
"login.example.com/cas/login?username={username}&password={password}"
When typed into any browser, this is redirected to the standard login page: login.example.com/cas/login. But what I have found, is that if I follow this format:
"login.example.com/cas/login?lt=LT-{current-login-ticket}
&execution={current-execution-value}&_event=submit&username={username}
&password={password}&submit=Submit"
I receive a successful login! But I have to use a current login ticket and execution value. Therefore, is there any way to automatically fill out the rest of the form data based on the values that are given? Or do I have to parse the HTML response myself to get the login ticket and execution value?

input type="file" accept="image/*" capture="camera" not working for mobile

I've got a simple form that uploads some basic info and an image to my formtools database. It works perfectly on desktop but not on mobile. On my Android phone when I test it it asks me to select the camera or file browser I have tried both camera and file browser and I take a picure / upload an image which it seems to do then loads the thank you page, but when I go the the form tools database the image has not been uploaded.
Anyone know why this isn't working?
here's the form
<form enctype="multipart/form-data" id="competitionform" class="uniForm cmxform" name="competitionform" method="post" action="/formtools/process.php">
<input type="hidden" name="form_tools_form_id" value="110" />
<header>
<h2>Upload your image</h2>
</header>
<label>Your Name </label>
<input width="100px;" type="text" placeholder=" " name="name" />
<label>Your Email </label>
<input type="text" placeholder=" " name="email" /> <
<label for="file">Upload Selfie</label>
<input type="file" name="uploadselfie"/>
<input type="submit" id="submit" value="Upload Selfie" />
</form>
I've also tried adding
accept="image/*" capture="camera"
to the input which opens the camera lets you take a picture then loads the thank you page but again no image is uploaded to the formtools database.
Thanks
<form> with enctype="multipart/form-data" can only upload pic/files and so on .It can't send other input which type is text to the database.
This point, you must set two forms, one for input type=text, another for input type=file.

Submit html form with results in webview

If I have a HTML form like this:
<form action="form_action.php" method="post">
First name: <input type="text" name="fname" /><br />
Last name: <input type="text" name="lname" /><br />
<input type="submit" value="Submit" />
</form>
And then I want to fill the fname & lname then like "press" the submit button programmatically and after that show the form_action.php with the post's in a webview.
And just so you know, I can't change the form, b'cause it's not my site I'm using.
Is that possible?
Hope you get it.
Thanks in advance. (Very sorry for bad english!)

Categories

Resources