Support Forum » User Profile

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • LucaLuca
    Participant

    Hello Peter,

    I report that with

    • MB Group 1.3.17 - 2023-02-08, or
    • Meta Box AIO (1.19.0 - 2023-03-08)

    the problem is fixed.

    Fix incorrect group title with radio/checkbox/switch

    Thanks

    in reply to: Missing 'Link field' #40375
    LucaLuca
    Participant

    +1 for me either

    As noted above a link field would be very useful

    LucaLuca
    Participant

    Hi,
    this didn't work for me either.

    After digging deeper into the problem, I noticed that the saved values are retrieved from the RWMB_Request object and that this is not updated after calling the 'before_save_post' action.

    I have explicitly called the update of the Post values of the object calling the method set_post_data()

    You could try and change your code as follows:

    
    add_action( 'rwmb_m_contact_before_save_post', function() {
       $_POST['add_new_contact'] = 0;
       $_POST['test_field'] = 'test';
    
       if ( function_exists( 'rwmb_request' ) ) {
          rwmb_request()->set_post_data( $_POST );
       }
    } );
    


    @justdoit123

    Please, let me know if this corrects the problem on your side.


    @Peter

    Please, update the documentation or fix the problem, thanks.

    in reply to: MB Conditional Logic is not working in Customizer #40267
    LucaLuca
    Participant

    Hi Peter,
    thanks for answer me.

    The code reported in my previous post was provided from the "Get PHP Code" of the Builder (Choices= 0:Hide
    1:Show) and I agree it looks a bit messy

    I have tried with your modifications and still obtains same results (working nicely in settings page and not working in Customizer):

    https://share.getcloudapp.com/QwujBKkG

    I also noticed that by trying the Customizer repeatedly, sometimes it works correctly. But I have not found a consistent behavior.

    I have used the following:

    Clean WordPress installation (6.1.1),
    Meta Box 5.6.15,
    Meta Box AIO 1.17.0

    Theme: Twenty Twenty-Two

    No other plugins
    No Custom Fields via Builder
    No Settings Pages via Builder
    All MB available extensions activated
    No console errors

    Settings Page and Custom Fields created with the following code in functions.php:

    
    add_filter( 'mb_settings_pages', 'lm_settings_page' );
    function lm_settings_page( $settings_pages ) {
    	$settings_pages[] = [
            'menu_title' => __( 'LM: Test', 'your-text-domain' ),
            'id'         => 'lm-settings-test',
            'position'   => 25,
            'style'      => 'boxes',
            'columns'    => 1,
            'customizer' => true,
            'icon_url'   => 'dashicons-admin-generic',
        ];
    
    	return $settings_pages;
    }
    
    add_filter( 'rwmb_meta_boxes', 'lm_meta_boxes' );
    function lm_meta_boxes( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'          => __( 'LM: Test 1', 'your-text-domain' ),
            'id'             => 'test-2',
            'settings_pages' => ['lm-settings-test'],
    
    		'fields'         => [
    			[
    				'name'    => __( 'Select', 'your-text-domain' ),
    				'id'      => $prefix . 'select_test_1',
    				'type'    => 'select',
    				'options' => [
    					'a' => __( 'A', 'your-text-domain' ),
    					'b' => __( 'B', 'your-text-domain' ),
    					'c' => __( 'C', 'your-text-domain' ),
    
    				],
    			],
    			[
    				'name'    => __( 'Text', 'your-text-domain' ),
    				'id'      => $prefix . 'text_nhbsf837xqg',
    				'type'    => 'text',
    				'visible' => [
    					'when'     => [['select_test_1', '=', 'b']],
    					'relation' => 'or',
    				],
    			],
    		]
    
        ];
    
        return $meta_boxes;
    }
    
    

    I am glad to help investigate this problem.
    Please, let me know.

    in reply to: MB Conditional Logic is not working in Customizer #40257
    LucaLuca
    Participant

    Hi,
    I am having the same problem.

    The Conditional Logic is working in the Settings page, but it is not working in the Customizer.

    Please, see the video:
    https://share.getcloudapp.com/P8uNX1Lk

    With a clean WordPress installation (6.1.1),
    Meta Box 5.6.15,
    Meta Box AIO 1.17.0

    No other plugins
    No other Custom Fields
    No other Settings Pages
    All available extensions activated
    No console errors

    Custom Fields created with MB Builder:

    
    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'          => __( 'Test 1', 'your-text-domain' ),
            'id'             => 'test-1',
            'settings_pages' => ['test'],
            'fields'         => [
                [
                    'name'    => __( 'Select', 'your-text-domain' ),
                    'id'      => $prefix . 'select_test_1',
                    'type'    => 'select',
                    'options' => [__( 'Hide{/translate}', '{translate}Show', 'your-text-domain' )],
                ],
                [
                    'name'    => __( 'Text', 'your-text-domain' ),
                    'id'      => $prefix . 'text_nhbsf837xqg',
                    'type'    => 'text',
                    'visible' => [
                        'when'     => [['select_test_1', '=', 1]],
                        'relation' => 'or',
                    ],
                ],
            ],
        ];
    
        return $meta_boxes;
    }
    

    Thanks in advance

    in reply to: WYSIWYG Auto P Tags #40152
    LucaLuca
    Participant

    Thanks for the tip.

    I would suggest to add a small tooltip to the "Save data in the raw format" checkbox available in the WYSIWYG field settings.

    Thanks again.

    in reply to: number field limits for Field group ? #31039
    LucaLuca
    Participant

    Hi,

    I was in the same situation and the linked article solved my problem too.

    I think it would be very useful to have some kind of warning if the number of the submitted input vars exceed the PHP max_input_vars limit instead of the misleading "Field group updated" notification.

    In my opinion it would be very useful also a "warning" remainder in the field group documentation.

    Thanks

Viewing 7 posts - 1 through 7 (of 7 total)