GithubHelp home page GithubHelp logo

Comments (2)

jessedc avatar jessedc commented on July 17, 2024

Off the top of my head I'm not sure. If you look at the EZFormDemo/ScrollView Form on iPad it has a EZFormRadioField, and when you activate it the background behind the picker view is grey. UIPickerView has no background colour by default. EZForm doesn't modify the background colour of anything either.

If you can post some basic code I may be able to help if it's EZForm.

from ezform.

amcastror avatar amcastror commented on July 17, 2024

@jessedc, sory for the delay, I was out of town. Here's some code behind what I'm doing (only for the first EZFormRadioField).

@interface CreateReportViewController () <EZFormDelegate>
//...
@property (weak, nonatomic) IBOutlet EZFormInputControl *report_proyect;
//...
@end

@implementation CreateReportViewController
- (void)awakeFromNib{
    [super awakeFromNib];

    _form = [[EZForm alloc] init];
    _form.inputAccessoryType = EZFormInputAccessoryTypeStandard;
    _form.delegate = self;

    //...
    EZFormRadioField *report_proyect = [[EZFormRadioField alloc] initWithKey:REPORT_KEY_PROYECT];

    //...
    [_form addFormField:report_proyect];
    //...
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    //...
    [[self.form formFieldForKey:REPORT_KEY_PROYECT] useLabel:self.report_proyect];
    EZFormRadioField *proyectField = [self.form formFieldForKey:REPORT_KEY_PROYECT];
    proyectField.inputView = [[UIPickerView alloc] initWithFrame:CGRectZero];
    __strong EZFormInputControl *proyectInputControl = self.report_proyect;
    proyectInputControl.tapToBecomeFirstResponder = YES;
    //...

    //configurationStrings -> array of NSString
    [[_form formFieldForKey:REPORT_KEY_PROYECT] setChoicesFromArray:[configurationStrings objectForKey:REPORT_FORM_PROYECTS]];
    [[_form formFieldForKey:REPORT_KEY_PROYECT] setValidationRequiresSelection:YES];
    [[_form formFieldForKey:REPORT_KEY_PROYECT] setValidationRestrictedToChoiceValues:YES];
    [[_form formFieldForKey:REPORT_KEY_PROYECT] setUnselected:@"Sleccionar"];
    [[_form formFieldForKey:REPORT_KEY_PROYECT] setFieldValue:_report.proyect.name];
}

That's all. Thanks a lot for the help!

from ezform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.