How Can We Help?

Search for answers or browse about Sintel Forms.

Add a button that opens the attachment panel

You are here:
This article is now redundant due to an update in Sintel Forms that made this functionality easier!

Open our helpdesk article: https://sintelapps.com/product-help-sintel-forms/buttons

Adding a button to the form that opens the attachment panel is very simple. All you need is only 3 steps:

  1. Configure section ‘HTML text’ property:
    <div id="my-button"/>

     

  2. Create a rule in logic with the following code:
    var buttonId = "toggle-workflow-panel-button";
    
    if (!document.getElementById(buttonId)) {
        // 1. Create the button
        var button = document.createElement("button");
        button.id = buttonId;
        button.innerHTML = "Click me!";
        
        // 2. Append somewhere
        var container = document.getElementById("my-button");
        container.appendChild(button);
        
        // 3. Add event handler
        button.addEventListener ("click", function() {
            togglePanel("attachments");
        });
    }

     

     

  3. Start using it.

For more information please navigate here and check openPanel() / togglePanel()

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents