Brian
SSolara
•Created by Brian on 8/5/2024 in #questions-issues
Creating a form when I don't know how many user inputs there will be at development time
Thank you for this example -- I was able to get it working by following what you did. Very helpful!
9 replies
SSolara
•Created by Brian on 8/5/2024 in #questions-issues
Creating a form when I don't know how many user inputs there will be at development time
9 replies
SSolara
•Created by Brian on 8/5/2024 in #questions-issues
Creating a form when I don't know how many user inputs there will be at development time
9 replies
SSolara
•Created by Brian on 8/5/2024 in #questions-issues
Creating a form when I don't know how many user inputs there will be at development time
9 replies
SSolara
•Created by Brian on 8/5/2024 in #questions-issues
Creating a form when I don't know how many user inputs there will be at development time
My issue/question is: how do I create the reactive variable(s) to capture the user input?
I would expect that the
value
that I want to pass to the InputText
should be a reactive variable (?), or else that I would create a reactive variable that is a dictionary and have it be keyed by question_id
with the values being the text in the InputText
. I've tried creating a dict of reactive variables and a reactive dict, but it doesn't seem to work.
Here is a minimal example. It "works," except that when you click "Answer" nothing happens -- the print statements do not execute.9 replies
SSolara
•Created by Brian on 8/5/2024 in #questions-issues
Creating a form when I don't know how many user inputs there will be at development time
I want to create a form that has a few questions for a user to answer. I want to store the questions in a database, which means that the application won't know ahead of time how many questions there will be.
So let's say a have a table like:
On application start, I would expect to read these questions into a dictionary
{question_id: question_text}
. When constructing my form (using solara.lab.ConfirmationDialog
), I would loop through the list of questions to create a prompt (solara.Text
) and an input text box (solara.InputText
).
When the user submits the form, I want to capture the responses and write them to a table in my database like:
9 replies
SSolara
•Created by Brian on 8/5/2024 in #questions-issues
Creating a form when I don't know how many user inputs there will be at development time
Sorry for the bad formatting... Discord won't let me paste text without adding it as an attachment.
9 replies
SSolara
•Created by Brian on 4/18/2024 in #questions-issues
PermissionError for nbextensions on startup with v1.29+
i think i have resolved my issue -- by chmod-ing my
/usr/local/share
directory to allow more access than was initially present. however, i mentioned in the issue that i raised that the path that was causing trouble did not even exist. so i wonder if the code could be improved by catching PermissionError
s -- if the user doesn't have permission to the directory or file, that is basically the same as "does not exist".9 replies
SSolara
•Created by Brian on 4/18/2024 in #questions-issues
PermissionError for nbextensions on startup with v1.29+
9 replies
SSolara
•Created by Brian on 4/18/2024 in #questions-issues
PermissionError for nbextensions on startup with v1.29+
9 replies
SSolara
•Created by Brian on 4/18/2024 in #questions-issues
PermissionError for nbextensions on startup with v1.29+
i can create an issue in GitHub if that's more appropriate.
9 replies
SSolara
•Created by Brian on 4/18/2024 in #questions-issues
PermissionError for nbextensions on startup with v1.29+
the logging output with stacktrace is:
9 replies
SSolara
•Created by Brian on 4/18/2024 in #questions-issues
PermissionError for nbextensions on startup with v1.29+
i've diffed the outputs from
pip freeze
for my two environments, and the only difference is the version of solara (and solara-assets).9 replies