[GH-ISSUE #170] Feature Request : Get a FormItem typed or add some shortcut on InputField (Ctrl+P) #137

Closed
opened 2026-03-04 01:02:17 +03:00 by kerem · 3 comments
Owner

Originally created by @joakim-ribier on GitHub (Oct 6, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/170

Hi,

I tried to understand how it's possible to get an already typed FormItem (example: InputField) from Form, for to add some shortcuts or to set a text (it what I need), but I did'nt succeed, I think is not possible ?

I read the wiki and the examples but sorry if I missed something...

Thanks to you,

Originally created by @joakim-ribier on GitHub (Oct 6, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/170 Hi, I tried to understand how it's possible to get an already typed `FormItem` (example: `InputField`) from `Form`, for to add some shortcuts or to set a text (it what I need), but I did'nt succeed, I think is not possible ? I read the wiki and the examples but sorry if I missed something... Thanks to you,
kerem closed this issue 2026-03-04 01:02:17 +03:00
Author
Owner

@joegrasse commented on GitHub (Oct 8, 2018):

I am not a 100% sure what you are asking, but there is the GetFormItemByLabel method. You provide the name of the item you want, and it returns the first FormItem that matches.

<!-- gh-comment-id:427813223 --> @joegrasse commented on GitHub (Oct 8, 2018): I am not a 100% sure what you are asking, but there is the [GetFormItemByLabel](https://godoc.org/github.com/rivo/tview#Form.GetFormItemByLabel) method. You provide the name of the item you want, and it returns the first ```FormItem``` that matches.
Author
Owner

@joakim-ribier commented on GitHub (Oct 8, 2018):

Ok sorry for that, I think I was very tired...

Thanks for your time!

Otherwise awesome library to make text ui app ;-)

<!-- gh-comment-id:427842359 --> @joakim-ribier commented on GitHub (Oct 8, 2018): Ok sorry for that, I think I was very tired... Thanks for your time! Otherwise awesome library to make text ui app ;-)
Author
Owner

@joegrasse commented on GitHub (Oct 8, 2018):

Glad I could help. I am just a user of the library like you :)

<!-- gh-comment-id:427882260 --> @joegrasse commented on GitHub (Oct 8, 2018): Glad I could help. I am just a user of the library like you :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#137
No description provided.