How to get all values from all textfields

jack

After googling this issue i managed to do this

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
    NSString *cellIdentifier = @"InsertMarksCell";
    SaveAllExamMarksForAllStudentsTableViewCell *myCell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];

    StudentPersonalInfo *newStudentName = feedItemsNow[indexPath.row];

    myCell.txtStudentMark.text = @"hello";
    myCell.txtStudentMark.delegate = self;
    myCell.txtStudentMark.tag = indexPath.row;

    return myCell;
}

this code i this sets the textfield " txtStudentMark " delegate and sets it's tag ...

-(void) textFieldDidEndEditing: (UITextField * ) textField
{
    NSString *text = [(UITextField *)[self.view viewWithTag:55] text];
    NSLog(@"%@",text);
}

i keep getting null value using the NSLog Function

i have a textField in a custom cell which the user will fill with data and i need to get all data from all textfields, am i going the right way ?

from what i understood, i need to set the tag for textField and set it as delegate, then i can call textfield by tag to get the text in it .

how can i make this work ?

Doro

Why don't you use

-(void) textFieldDidEndEditing: (UITextField * ) textField
{
    NSString *text = [textField text];
    NSLog(@"%@",text);
} 

?

Your problem is that you are adding textfield into cell, but ask view for this tag.

EDIT:

to get your textfield from tableview

-(void) textFieldDidEndEditing: (UITextField * ) textField
{
    UITableViewCell *cell = [self.view.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:55 inSection:0]];

    NSString *text = [(UITextField *)[cell.contentView viewWithTag:55] text];
    NSLog(@"%@",text);
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to get all values from all textfields

From Dev

How to get the values of all textfields in add/remove textfields and form JSON

From Dev

How do I get all TextFields from a pane with foreach-loop?

From Dev

How to select all the TextFields on a FormPanel?

From Dev

How to get all values from table

From Dev

How to get all values from Jlist?

From Dev

How to get all values from a list?

From Dev

How to get all values from multiple options

From Dev

How to get all the values from a FilteringSelect in dojo?

From Dev

How to get all values from same column?

From Dev

Get all values from an element

From Dev

get all values from dictionary

From Dev

How to make all textfields close keyboard on return?

From Dev

How to get all values in QTableView?

From Java

How to get all values from python enum class?

From Dev

How to get all keys from dictionary that specified values?

From Dev

How to get all values as a single string from NameValueCollection?

From Dev

JqGrid: How to get all column values from onCellSelect event?

From Dev

How to get all selected values from multiple select option?

From Dev

How to get all values from complex multi-dimensional array?

From Dev

How get all rows values into a string from datatable?

From Dev

How to get all values for a key from an array of hashes?

From Dev

How to get all the values from the same Name xml c#

From Dev

How to get all values from an array of objects with nested arrays of objects?

From Dev

How to get all values of one key from laravel multidimensional array

From Dev

How do I get all the values of a particular field from a store?

From Dev

JqGrid: How to get all column values from onCellSelect event?

From Dev

How to get all values as a single string from NameValueCollection?

From Dev

C#: how to get all values for keys from JS Object?

Related Related

  1. 1

    How to get all values from all textfields

  2. 2

    How to get the values of all textfields in add/remove textfields and form JSON

  3. 3

    How do I get all TextFields from a pane with foreach-loop?

  4. 4

    How to select all the TextFields on a FormPanel?

  5. 5

    How to get all values from table

  6. 6

    How to get all values from Jlist?

  7. 7

    How to get all values from a list?

  8. 8

    How to get all values from multiple options

  9. 9

    How to get all the values from a FilteringSelect in dojo?

  10. 10

    How to get all values from same column?

  11. 11

    Get all values from an element

  12. 12

    get all values from dictionary

  13. 13

    How to make all textfields close keyboard on return?

  14. 14

    How to get all values in QTableView?

  15. 15

    How to get all values from python enum class?

  16. 16

    How to get all keys from dictionary that specified values?

  17. 17

    How to get all values as a single string from NameValueCollection?

  18. 18

    JqGrid: How to get all column values from onCellSelect event?

  19. 19

    How to get all selected values from multiple select option?

  20. 20

    How to get all values from complex multi-dimensional array?

  21. 21

    How get all rows values into a string from datatable?

  22. 22

    How to get all values for a key from an array of hashes?

  23. 23

    How to get all the values from the same Name xml c#

  24. 24

    How to get all values from an array of objects with nested arrays of objects?

  25. 25

    How to get all values of one key from laravel multidimensional array

  26. 26

    How do I get all the values of a particular field from a store?

  27. 27

    JqGrid: How to get all column values from onCellSelect event?

  28. 28

    How to get all values as a single string from NameValueCollection?

  29. 29

    C#: how to get all values for keys from JS Object?

HotTag

Archive