Custom Fields
Re-Envisioned
Support MB Frontend Submission How do I set submission posts to private?

  • Creator
    Topic
  • #32033
    Andrew_Vincent
    Participant

    Hi there.

    This is probably a simple thing but I couldn't find in the documentation...

    I've set up a front-end form for my client to receive expressions of interest eg:
    https://flexigrain.com.au/pools-strategies/hectare-based-contracts/expression-of-interest-wa/

    Everything works fine but each submission creates a post which at the moment is publicly visible. ie. peoples contact details can be trawled by crawlers.

    How do I set the generated submission post to be Private?

    Current code:

    add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
    
    $meta_boxes[] = array (
        'title' => 'Submit Paddock',
        'id' => 'submit_tonnage_form_nsw',
                'post_types' => 'post',
                'validation'    =>  [
                     'rules' =>  [...]
                 ],
        'fields' => [...]
        );
    
    return $meta_boxes;
    
    });

    ... which is then added to front-end via shortcode.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.