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 7368045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:36:54+00:00 2026-05-29T03:36:54+00:00

I currently have a group of text fields being created and under a certain

  • 0

I currently have a group of text fields being created and under a certain condition instead of a keyboard the text field will display a pickerview. Once a selection is made, I need to populate the text field with the selection. I have created tags on all of the text fields, the problem is I don’t know the syntax to select the text field I want.

Here is the code for creating the text field with the pickerview.

    else if([input.controlTypeName compare:@"RadioButton"] == NSOrderedSame){
        UITextField *pickerViewtext = [[UITextField alloc] initWithFrame:CGRectMake(x, y, 280, 31)];          
        pickerViewtext.borderStyle = UITextBorderStyleRoundedRect;
        pickerViewtext.textColor = [UIColor blackColor]; //text color
        pickerViewtext.font = [UIFont systemFontOfSize:17.0];  //font size
        pickerViewtext.placeholder = placeholder;   //place holder
        pickerViewtext.backgroundColor = [UIColor whiteColor]; //background color
        pickerViewtext.autocorrectionType = UITextAutocorrectionTypeNo; // no auto correction support
        pickerViewtext.tag = i;  //tag the textfields for future data collection
        pickerViewtext.keyboardType = UIKeyboardTypeDefault;  // type of the keyboard
        pickerViewtext.returnKeyType = UIReturnKeyDone;  // type of the return key
        pickerViewtext.clearButtonMode = UITextFieldViewModeWhileEditing;   // has a clear 'x' button to the right     
        pickerViewtext.delegate = self; // let us be the delegate so we know when the keyboard's "Done" button is pressed

        UIPickerView *radioPicker = [[UIPickerView alloc] initWithFrame:CGRectZero];
        radioPicker.delegate = self;
        radioPicker.showsSelectionIndicator = YES;
        radioPicker.tag = i;   
        radioTag = i;

        [radioSize addObject:[NSNumber numberWithInt:5]];
        [radioList addObject:input.sourceText];     


        pickerViewtext.inputView = radioPicker;


        [inputsView addSubview:pickerViewtext];
        y = y + 50;
   }

I’m basically at a loss for what to put into my

- (void)pickerView:(UIPickerView *)pickerView didSelectRow: (NSInteger)row inComponent:    (NSInteger)component {
// Handle the selection
  }

delegate method. I thought about using the ‘radioTag’ variable as some kind of global. But with the possibility of multiple textfields that use a pickerview, this would only cause all of the picker views to link back to the same text field. And most tag examples I have found don’t seem to apply to this or are too old and the syntax has changed. Any help would be great.

Thanks.

  • 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-05-29T03:36:54+00:00Added an answer on May 29, 2026 at 3:36 am
    UITextField *textField = (UITextField *)[inputsView viewWithTag:pickerView.tag];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the form with a number of input fields, text areas, radio buttons,
I have a field like the following: <div class=control-group> <label class=control-label for=lname>Last Name</label> <div
Currently, I have a script which does the following. If I have text file
I have a search field, and using that single text box I want the
I'm creating a small win32 application. Currently I have 6 text labels coded in
I have a group of text based rules that are structured like this: Rule
I currently have an MS Access application that connects to a PostgreSQL database via
I currently have speakers set up both in my office and in my living
I currently have an existing database and I am using the LINQtoSQL generator tool
We currently have a company email server with Exchange, and a bulk email processing

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.