Created
October 15, 2012 19:56
-
-
Save wess/3894907 to your computer and use it in GitHub Desktop.
Survey example form file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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