cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

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...

afshinR
New Contributor III

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

4 REPLIES 4

afshinR
New Contributor III

thank you very much. We are starting a lot of great projects with dataricks. It is a great system.

afshinR
New Contributor III

thank you very much

Dan_Z
Databricks Employee
Databricks Employee

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.

jose_gonzalez
Databricks Employee
Databricks Employee

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.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group