Hide Save as Draft Button

Introduction

In this guide, you'll learn how to hide the Save as Draft button from your form using JavaScript. This is useful if you want to simplify the user interface by removing options that aren't relevant to your form's workflow. By implementing the provided code, you can ensure that the Save as Draft button is not visible to users.

How Does It Work?

The code snippet provided utilizes jQuery to manipulate the Document Object Model (DOM). When the document is fully loaded, the script selects the Save as Draft button using its ID and removes it from the page. This change is applied in real-time, so users won't see the button once the script executes.

You may hide the Save as Draft button by putting the code written below in:
 
<script type="text/javascript">
    $(document).ready( function(){
        $("#saveAsDraft").remove();
    });
</script>
Created by Julieth Last modified by Aadrian on Dec 13, 2024