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
914 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 500 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now