10-07-2021 09:09 AM
Hi,
I like to create a web form with displayHTML in a notebook cell and when the users presses the post button, i like to write the content of my text area of my form back in to the code cell of the notebook.
Example:
displayHTML ("""
<form>
<textarea> user will inot somethig here
</textarea>
<button onClick="post it back to a notebook cell"/>
""")
I can't use the dbutils.widgets because it doesn't have a button.
any suggestion is greatly appreciated.
Thanks,
Afshin
10-07-2021 09:26 AM
Hi @afshinR! My name is Kaniz, and I'm the technical moderator here. Great to meet you, and thanks for your question! Let's see if your peers in the community have an answer to your question first. Or else I will get back to you soon. Thanks.
10-07-2021 09:36 AM
thank you very much. We are starting a lot of great projects with dataricks. It is a great system.
10-07-2021 10:21 AM
Wow!
That sounds great😍 .
I'm delighted to welcome you to the Databricks Community.
Please feel free to reach out.
I'm here to help you.
10-07-2021 10:37 AM
thank you very much
10-20-2021 02:39 PM
hey @afshin riahi - a spent a good amount of time trying to get this working. I thought I could update an existing widget directly using a javascript function that gets triggered onClick, but there are deeper issues because displayHTML() uses a locked-down sandbox.
The good news is that we have some new functionality coming out that does this and much more. It is called ipywidgets. We are actually signing up customers right now for Private Preview of this feature. If you want to go forward on this, this is your best bet. Reach out to your CSE or AE and ask to be added to that.
10-29-2021 03:52 PM
Hi @afshin riahi ,
Did Dan's response helped you to solve your question? if it did, can you mark it as best answer? I will help to move the post to the top so other can quickly find the solution.