cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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

6 REPLIES 6

Kaniz
Community Manager
Community Manager

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.

afshinR
New Contributor III

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

Kaniz
Community Manager
Community Manager

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.

afshinR
New Contributor III

thank you very much

Dan_Z
Honored Contributor
Honored Contributor

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

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.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.