Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

In iPad app what would be the easiest way to create a form that will store the data and send it to email?

Posted on 2010-11-11
1
Medium Priority
?
939 Views
Last Modified: 2013-11-25
Hello Experts,

I would like to create an application for iPad that will display a form for people to fill in their details like name, address and the phone number and when they press send button will automatically send it to desired email address. Can someone please help me to write the code for that??

Thank you!
0
Comment
Question by:zelu1984
1 Comment
 
LVL 13

Accepted Solution

by:
SpeedyApocalypse earned 2000 total points
ID: 34163853
Well, first, you are going to want to search for MFMailComposer so you can actually send mail within the app (and not have to go out to the Mail.app program).  

Have you had experience with TextFields?  You are going to need a few of these.  You can connect them and have the user enter information.  To access the TextField's text, you can call .text using dot syntax.  For example (myField.text).  I assume you do not want to have blank fields, so before you compose the mail, make sure to add:

if(![myField.text isEqualToString:@""] && ![myField.text isEqualToString@" "]) {

//Do stuff

}

This make sure that the above text field is not empty or just doesn't have a space in it.  

I would personally get all of the text from a text field and add this to an NSString.  I would then correctly format the string so it looks nice and the information is correct (as per what you wanted).  Now, simply call the MailComposer and it will be able to send.  I do not think that you can simply send without the user knowing (there will be some picker that has to be brought up).
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Simple Linear Regression

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question