'how to display text in textinput box when i press number button. i am creating passcode login

I am creating Passcode login app screen when i press button it will print text but not in textinput box. i want to print my text in text box which i created in my first screen. please help me.

kivy

    BT0 = Button(text="0", size_hint=(0.1, 0.1), pos_hint={'center_x': 0.5, 'center_y': 0.3}, color=(0, 0, 0, 1))
    BT0.bind(on_press=callback)
    layout.add_widget(BT0)

    

    textinput = TextInput(password=True,multiline=False, size_hint=(.2, .05), halign="center",
                          pos_hint={'center_x': 0.5, 'center_y': 0.8})

    textinput.bind()
    layout.add_widget(textinput)

    return layout


Solution 1:[1]

From what I understood, you are trying to retrieve the text of a TextInput in another screen. All you have to do is give the TextInput an id, then you can simply grab the text by running self.ids.NAME_OF_ID.text (this must be within a class function)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mohammad.alqashqish