Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9298979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:27:14+00:00 2026-06-18T22:27:14+00:00

I’m trying to integrate the Wufoo API into an iPhone Application, and having difficulty

  • 0

I’m trying to integrate the Wufoo API into an iPhone Application, and having difficulty at the last stage. I have used AFNetworking to make the connection to the Wufoo form successfully, having made a subclass of AFHTTPClient to accommodate the extra headers required, such as HTTP authorisation. I’ve also set Parameter Encoding to AFJSONParameterEncoding.

When I make a request using the above, it successfully connects to the server and posts the data, but an error comes back to do with blank fields. I’ve added the Field/Key pairs in an NSDictionary to be passed in the request, but they must be in the wrong format or something because they’re not getting processed at the other end. Sorry, I know it’s a lengthy question, but any help would be appreciated :). I’ve appended the response I get in the console, and the relevant class files/methods.

Response:

2013-02-14 12:11:43.053 <AppName>[14750:c07] Success?: 0
Error: Errors have been <b>highlighted</b> below.
Fields: (
        {
        ErrorText = "This field is required. Please enter a value.";
        ID = Field1;
    },
        {
        ErrorText = "This field is required. Please enter a value.";
        ID = Field3;
    },
        {
        ErrorText = "This field is required. Please enter a value.";
        ID = Field222;
    },
        {
        ErrorText = "This field is required. Please enter a value.";
        ID = Field11;
    },
        {
        ErrorText = "This field is required. Please enter a value.";
        ID = Field12;
    },
        {
        ErrorText = "This field is required. Please enter a value.";
        ID = Field220;
    }
)

Class Files:

ViewController.m

 -(NSDictionary *)getParameters {
   
        NSDictionary *d = [NSDictionary dictionaryWithObjectsAndKeys:
                       emailAddress, @"Field1", //problem
                       firstName, @"Field3", //problem
                       lastName, @"Field4", 
                       activityArranged, @"Field10",
                       evidenceDescription, @"Field222", // problem
                       startDate, @"Field11", //Problem
                       endDate, @"Field224",
                       @"1", @"Field12", //Problem
                       benefitExplanation, @"Field113",
                       activityCategory, @"Field116",
                       webAddress, @"Field219",
                       @"I Agree", @"Field220", //Problem
                       nil];
   
        return d;
   }

-(void)submitForm {
            DiaryForm *df = [[DiaryForm alloc] init];
            [df submitForm:self params:[self getParameters]];
}

DiaryForm.m

-(void)submitForm:(id)sender params:(NSDictionary *)params {
WufooAPIClient *client = [WufooAPIClient sharedClient];
    [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];
    [[AFNetworkActivityIndicatorManager sharedManager] incrementActivityCount];
    NSURLRequest *req = [client requestWithMethod:@"POST" path:@"entries.json" parameters:params];
    AFJSONRequestOperation *op = [AFJSONRequestOperation JSONRequestOperationWithRequest:req success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
        [[AFNetworkActivityIndicatorManager sharedManager] decrementActivityCount];
        NSLog(@"Success?: %@\nError: %@\nFields: %@",[JSON objectForKey:@"Success"], [JSON objectForKey:@"ErrorText"], [JSON objectForKey:@"FieldErrors"]);
        
       
    }failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
        [[AFNetworkActivityIndicatorManager sharedManager] decrementActivityCount];
        
        NSLog(@"[Error]: (%@ %@) %@", [request HTTPMethod], [[request URL] relativePath], error);
        
    }];
    [op start];

}

WufooAPIClient.m

#import "WufooAPIClient.h"
#import "AFNetworking.h"


@implementation WufooAPIClient

+(WufooAPIClient *)sharedClient {
    static WufooAPIClient *_sharedClient = nil;
    static dispatch_once_t oncePredicate;
    dispatch_once(&oncePredicate, ^{
        NSString *kProtocol = @"https";
        NSString *kSub = @"<removed>";
        NSString *kHost = @"wufoo.com";
        NSString *kHash = @"<removed>";
        NSString *sURL = [NSString stringWithFormat:@"%@://%@.%@/api/v3/forms/%@/", kProtocol, kSub, kHost, kHash];
        NSLog(sURL);
        NSURL *url = [NSURL URLWithString:sURL];
        _sharedClient = [[self alloc] initWithBaseURL:url];
    });
    return _sharedClient;
}

-(id)initWithBaseURL:(NSURL *)url {
    self = [super initWithBaseURL:url];
    if (!self) {
        return nil;
    }
    [self registerHTTPOperationClass:[AFJSONRequestOperation class]];
    [self setDefaultHeader:@"Accept" value:@"application/json"];
    [self setAuthorizationHeaderWithUsername:@"<removed>" password:@"<removed>"];
    self.parameterEncoding = AFJSONParameterEncoding;
    
    return self;
}

@end

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T22:27:16+00:00Added an answer on June 18, 2026 at 10:27 pm

    Fixed the issue by changing a line in the WufooAPIClient.m class, initWithBaseURL: method.

    This:

    self.parameterEncoding = AFJSONParameterEncoding;
    

    To:

     self.parameterEncoding = AFFormURLParameterEncoding;
    

    Wufoo works by sending HTTP POST data, then send you back either a json or xml response. What I had done was to set the data sent to be JSON data rather than Form Data as it should have been.

    Hope that helps anyone trying to do the same thing 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to loop through a bunch of documents I have to put
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.