Adding description to post_fields

Support MB Frontend Submission Adding description to post_fields

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7123
    flowdeeflowdee
    Participant

    Would be great if there's built-in way to add a description below the post_fields (title, description, thumbnail etc.)

    #7126
    Anh TranAnh Tran
    Keymaster

    I was thinking about this and the "require" attribute. Haven't found a good way to implement them in the shortcode. What do you think about this? Any suggestion?

    #7127
    flowdeeflowdee
    Participant

    Yeah indeed what assumed 😉

    Maybe it would be too complicated on a shortcode basis, especially when adding descriptions for multiple fields.

    What you would provide a filter loops through all "post_fields". This way we could easily hook into and add a custom description as well as the required attribute mentioned in another ticket.

    Here's a piece of "pseudo code":

    
    $post_field = array(
        'key' => 'title,
        'label' => 'Title',
        'description' => '',
        'required' => false
    );
    

    The filter could either be applied on every single field or on a array holding all fields which are "activated" through the shortcode.

    Hope you got what I mean 🙂

    #7142
    Anh TranAnh Tran
    Keymaster

    Hi Florian,

    Thanks for your patient. I've just updated the plugin with filters for the post fields. I also added a template loader, which you can use to define the template for each field (similar to what WooCommerce do).

    Please follow the instruction in the updated documentation.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Adding description to post_fields’ is closed to new replies.