Forum Discussion
end user UI in notebook
Hi Master
I have no experience with tkinter or HTML form. I tried ipywidgets to collect some data and it retrieved the data to the notebook. Below is my test result. You may give it a try!
import ipywidgets as widgets
# Create form widgets
name = widgets.Text(description="Name:")
age = widgets.IntText(description="Age:")
submit_button = widgets.Button(description="Submit")
# Function to handle form submission
def on_submit(button):
print(f"Name: {name.value}, Age: {age.value}")
# Attach the function to the button
submit_button.on_click(on_submit)
# Display the form
display(name, age, submit_button)
displayString = "Welcome to Fabric, " + name.value + "!"
display(displayString)
The Python environment in the notebook is PySpark, not a native Python. Therefore, some Python libraries might not work well in the Fabric notebook, as its primary purpose is for data engineering and data science, not for App development. If you need to design complex forms or collect a lot of data, it's better to use other tools to collect the information in advance and export it to a file format that the Fabric notebook can handle.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
yes, I know, there is only ipywidgets that works but it is not with that that I will give an interesting experience worthy of 2024 to the end users. see my other comments. thank you