I am a new user to Streamlit and thus quite unfamiliar with it’s all available functionality.
I was wondering how can we create a clickable input widget where if I click the text description part of the widget, it pops up with a box with texts and images (for explaining what that input means for user).
If you’re looking for a widget that doesn’t seem to be available in native streamlit, you can check out this post to see the components that people in the community have made for streamlit. Streamlit Components - Community Tracker
Hi @Goyo, help argument can suffice my need. I checked the documentation, but couldn’t find how I can make a user input mandatory for a widget (radio, number input etc.) or at least indicate for the user to provide it.
I don’t understand what you want. An input widget always has a value, if the value is fine for the user they don’t need to change it. If the value is not appropriate for the application you can show an error message.
Hi @Goyo , currently those widgets have a default value for each of them. However, what I am looking for is to somehow to tell the user to at least click/type a value (even if they click the default) so they don’t skip it.
As an example, these widgets all have some default value but I want to ensure user to click on the widget at least so it can be confirmed that they didn’t miss it
I was in a similar scenario and I’m just sharing how I dealt with it. I tackled it in two ways using Streamlit Forms:
a. I made an if loop which passes when all inputs are filled else shows error.
b. With a similar wrapper as in a. I seperated the checkbox part into a seperate container outside which displays once the initial form is filled.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.