I am taking user input for the number of articles they want to add as follows:
lin_num = st.number_input('How many articles would you like to add?', min_value=1)
and based on the input, I am creating different segments to take further user inputs as follows:
for i in range(0, lin_num): lin_position = st.text_input('Position', str(i + 1)) article = st.selectbox('Which article would you like to add?', options=articles, key=str(i + 1)) menge = st.text_input('Enter the Menge', value='0.0', key=str(i + 1))
Now, I also want to enable an option where the user can navigate to a particular article. For that, I am doing the following:
if st.sidebar.checkbox("Go to a specific article"): st.sidebar.subheader('Select the article you would like to see') specific_lin = st.sidebar.selectbox('Which LIN segment would you like to see?', [i for i in range(1, lin_num + 1)])
and this shows the list of articles the user has added in the form of a drop-down list.
Now, assuming that the user has added 50 articles and he wants to navigate to an article whose
lin_position is 27 to change the value of
menge. In such a case scrolling down to go to that particular article can be tedious. So, I would like to use the
Go to a specific article checkbox so that the user can select article 27. When the user selects 27, I want the screen to automatically navigate to this particular article and all the related information like:
lin_position, article, menge should be shown on the screen so that the user can check them and change them as required.
Is there a way this can be done?
Thanks in advance