save_field

Support General save_field

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44240
    Aaron KesslerAaron Kessler
    Participant

    I noticed the MB Builder Extension does generate this code

    
                [
                    'type'       => 'divider',
                    'save_field' => false,
                ],
                [
                    'type' => 'heading',
                    'name' => __( 'Heading', 'your-text-domain' ),
                ],
    

    The documentation for the layout fields does not mention that divider or any other layout field should have 'save_field' => false. Does the lack of this generate a value in the database? Why does the divider field - if generated with MB Builder - come with it, and other layout fields do not?

    #44243
    PeterPeter
    Moderator

    Hello Aaron,

    Actually, the fields divider and heading do not have input boxes to add value. So no need to have the setting 'save_field' => false. This setting is used to prevent saving value to the database when the field has an input box like text, wysiwyg, image ...
    I will inform the development team to improve the builder for this case.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.