Skip to content

Instantly share code, notes, and snippets.

@wess
Created October 15, 2012 19:56
Show Gist options
  • Save wess/3894907 to your computer and use it in GitHub Desktop.
Save wess/3894907 to your computer and use it in GitHub Desktop.
Survey example form file
// BJSignupForm.h
// Bizjournals
//
// Created by Wess Cope on 10/15/12.
// Copyright (c) 2012 ACBJ. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Survey/Survey.h>
@interface BJSignupForm : NSObject
@property (strong, nonatomic) SurveyField *firstname;
@property (strong, nonatomic) SurveyField *lastname;
@property (strong, nonatomic) SurveyField *email;
@property (strong, nonatomic) SurveyField *zipcode;
@property (strong, nonatomic) SurveyField *password;
@end
//
// BJSignupForm.m
// Bizjournals
//
// Created by Wess Cope on 10/15/12.
// Copyright (c) 2012 ACBJ. All rights reserved.
//
#import "BJSignupForm.h"
@implementation BJSignupForm
- (SurveyField *)firstname
{
SurveyField *field = [SurveyField fieldWithPlaceholder:@"First Name"];
field.isRequired = YES;
field.label = @"First Name";
return field;
}
- (SurveyField *)lastname
{
SurveyField *field = [SurveyField fieldWithPlaceholder:@"Last Name"];
field.isRequired = YES;
field.label = @"Last Name";
return field;
}
- (SurveyField *)email
{
SurveyField *field = [SurveyField fieldWithPlaceholder:@"Email Address"];
field.isRequired = YES;
field.label = @"Email";
return field;
}
- (SurveyField *)zipcode
{
SurveyField *field = [SurveyField fieldWithPlaceholder:@"Zip Code"];
field.isRequired = YES;
field.label = @"Zip Code";
return field;
}
- (SurveyField *)password
{
SurveyField *field = [SurveyField fieldWithPlaceholder:@"Password"];
field.isRequired = YES;
field.label = @"Password";
field.isSecure = YES;
return field;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment