How to add a Button to the Properties Panel


#1

Hi team!

I’ve been struggling with this for a while now, i want to add a button in the properties panel to call my form builder inside a modal, so i can allow the user to edit a form, then grab the result of the modal (the form markup) and save it to the schema, but im not making it very far.

Any thoughts?

Thanks!


#2

How far did you make it? What have you tried yet?


#3

I tried creating a new element in the entry factory to generate my button, but withou much success…

Any help is appreciated!


#4

Can you share any code that shows what you’ve been working on? That would make it easier to help you.


#5

Im afraid i cant share much code with you, but what im trying to acomplish is basically:

  • Render a button on the properties panel (almost made it this part)
  • Attach a function to the click event, that has access to the selected element on the diagram.
  • Grab the modal result so i can save it to a field on the selected element on the diagram.

Thanks in advance!


#6

So you want to add a button that opens a modal that let’s you edit a property of the element once you confirm/close it?


#7

Yep, thats exacly it !!

I even got the button to render in a somewhat broken way, but thats about as far as i got.