Disable post update in front end submission form

Support MB Builder Disable post update in front end submission form

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43455
    Salony MohantySalony Mohanty
    Participant

    hi,

    i want to disable update of the post data from front end form after the post is created...
    so edit button will be activated in dashboard - but the update button will be disabled in the form..
    Is it possible to set it up this way?

    #43471
    PeterPeter
    Moderator

    Hello,

    You can use the PHP code to check if the query var rwmb_frontend_field_post_id is available and output a custom CSS code to hide the submit button. For example:

    add_action( 'rwmb_frontend_before_submit_button', function() {
        if( isset( $_GET['rwmb_frontend_field_post_id'] ) ) {
            ?>
            <style type="text/css">
                .mbfs-form .rwmb-form-submit {
                    display: none;
                }
            </style>
            <?php
        }
    });
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.