[PR #298] [CLOSED] Added GetFormItems() #902

Closed
opened 2026-03-04 01:08:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/298
Author: @mikeschinkel
Created: 6/9/2019
Status: Closed

Base: masterHead: form_getformitems


📝 Commits (1)

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 form.go (+6 -0)

📄 Description

As I could not find a current way to determine the number of form items from code written outside of the tview.Form class, the GetFormItem(n) method can't be used reliably if the number of fields is unknown. For my use case I wanted to iterate all of them so I am submitting this pull request that would allow a developer to do so.

Hopefully this is simple and obvious enough of a change that it will be a no-brainer to commit.

(Note: This is a replacement for #287 that I closed because it was based on the master branch and not on a fork specific to this PR.)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rivo/tview/pull/298 **Author:** [@mikeschinkel](https://github.com/mikeschinkel) **Created:** 6/9/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `form_getformitems` --- ### 📝 Commits (1) - [`8663dc7`](https://github.com/rivo/tview/commit/8663dc7b682dc574abe8b609693727036da85204) Added GetFormItems() ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `form.go` (+6 -0) </details> ### 📄 Description As I could not find a current way to determine the number of form items from code written outside of the tview.Form class, the GetFormItem(n) method can't be used reliably if the number of fields is unknown. For my use case I wanted to iterate all of them so I am submitting this pull request that would allow a developer to do so. Hopefully this is simple and obvious enough of a change that it will be a no-brainer to commit. _(**Note:** This is a replacement for #287 that I closed because it was based on the master branch and not on a fork specific to this PR.)_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:29 +03:00
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#902
No description provided.