Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 3,751 through 3,765 (of 3,958 total)
  • Author
    Posts
  • in reply to: WSYIWYG seems to be broken when using groups - sorry to reopen #1460
    Anh TranAnh Tran
    Keymaster

    Great, I just got the email. We'll talk in email for details ๐Ÿ™‚

    in reply to: Conditional Logic/Groups not saving properly #1455
    Anh TranAnh Tran
    Keymaster

    Hi Sam,

    I tested your code and tried to replicate the bug. After testing, I found that this bug was reported in this topic before. It was also reported on Github and was fixed.

    I've just released the new version of Meta Box (4.5.7) which has a fix for this. The new version works fine to me. Please update Meta Box plugin and let us know if it works for you.

    Thanks.

    in reply to: MB Group doesn't save any values #1452
    Anh TranAnh Tran
    Keymaster

    Glad that you've solved your problem ๐Ÿ™‚

    in reply to: Date field visualisation problem #1443
    Anh TranAnh Tran
    Keymaster

    I think that works, too. I will add this question to the Documentation as this is maybe useful for others as well.

    in reply to: Conditional Logic Between Checklist Group and Checkbox #1438
    Anh TranAnh Tran
    Keymaster

    Hi Justin,

    Thanks again for contacting us, I've checked your registered code and see that's a bug and we'll list in in our documentation shortly.

    That bug happen when you define two field with similar ID, for example, 'hello' and 'hello_foo' or 'hello*' (* matches any characters)

    To workaround, you can update:

    
    'id' => $prefix . $slug . '_categories',
    

    To

    
    'id' => $prefix . 'categories_' . $slug,
    

    Best regards

    Tan Nguyen

    in reply to: Updater doesn't work #1436
    Anh TranAnh Tran
    Keymaster

    Hi again, I've just updated the Updater extension today with a fix for PHP notice bugs which I think caused the issue of wrong number of updates. I tested in my environments and it worked correctly. Can you please update and check that?

    Thanks!

    in reply to: Date field visualisation problem #1435
    Anh TranAnh Tran
    Keymaster

    Hi mendio,

    Yes, you can do that using the rwmb_{$field_id}_value and rwmb_{$field_id}_meta filters (see this documentation) to change the displayed value and saved value. Here is the sample code:

    add_filter( 'rwmb_ID_value', function( $value )
    {
        return date( 'Y-m-d', strtotime( $value ) );
    } );
    
    add_filter( 'rwmb_ID_meta', function( $value )
    {
        return date( 'd-m-Y', strtotime( $value ) );
    } );

    Don't forget to change ID to your field ID.

    in reply to: WSYIWYG seems to be broken when using groups - sorry to reopen #1434
    Anh TranAnh Tran
    Keymaster

    I received your email and replied. Please look at the email.

    in reply to: Metabox hidden using the same id #1422
    Anh TranAnh Tran
    Keymaster

    Hi Cararina,

    Sorry for long response, we're still in progress to improving Conditional Logic. As this plugin uses Javascript to handle visibility of object and have to check many field conditional to generate results so it's hard to implements now. In your case, we'll have two ways to make it works natively:

    1. Save it as cel_product_apple, cel_product_android or cel_product_windowsphone in DB then use fone_id to check what's field to output.

    2. Save cel_product_apple, cel_product_android or cel_product_windowsphone in DB, then create another hidden field named cel_product, when post is saved, we also save the visible field to cel_product as an serialized array, then use unserialize function to show up.

    Example (2),

    
    add_filter( 'rwmb_meta_boxes', function( $meta_boxes )
    {
    	$meta_boxes[] = array(
    		'id' 			=> 'brand_product',
    		'title' 		=> 'Brands and Products',
    		'post_types' 	=> array( 'post', 'page' ),
    		'context'		=> 'normal',
    		'priority'		=> 'high',
    		'fields' => array(
    			array(
    				'id'	=> 'fone_id',
    				'name'	=> 'Brand',
    				'desc'	=> 'Pick Your Favourite Brand',
    				'type'	=> 'select',
    				'options' => array(
    					'apple' 		=> 'Apple',
    					'android' 		=> 'Android',
    					'windowsphone' 	=> 'WindowsPhone'
    				)
    			),
    			array(
    				'id' 	=> 'cel_product',
    				'type' 	=> 'hidden',
    			),
    			array(
    				'id' 	=> 'cel_product_apple',
    				'name'	=> 'Select your apple product?',
    				'type'	=> 'checkbox_list',
    				'options' => array('iPhone', 'iPad', 'iPod'),
    				'visible' => array( 'fone_id', 'apple' )
    			),
    			array(
    				'id' 	=> 'cel_product_android',
    				'name'	=> 'Select your android product?',
    				'type'	=> 'checkbox_list',
    				'options' => array('Galaxy', 'ZenPhone', 'Tablet'),
    				'visible' => array( 'fone_id', 'android' )
    			),
    			array(
    				'id' 	=> 'cel_product_windowsphone',
    				'name'	=> 'Select your apple product?',
    				'type'	=> 'checkbox_list',
    				'options' => array( 'Nokia', 'Galaxy' ),
    				'visible' => array( 'fone_id', 'windowsphone' )
    			)
    		)
    	);
    	return $meta_boxes;
    } );
    
    add_action('rwmb_before_save_post', function($post_id)
    {
    	// Get person ID to save from "Select a Customer" field
    	$metabox_to_save = $_POST['fone_id'];
    
    	// Save related field to phone field
    	if ( ! empty( $_POST["cel_product_{$metabox_to_save}"] ) )
    		$_POST['cel_product'] = serialize( $_POST["cel_product_{$metabox_to_save}"] );
    
    	// Clear all hidden meta boxes
    	foreach ( array('apple', 'android', 'windowsphone') as $field )
    	{
    		if ( $field !== $metabox_to_save )
    			unset( $_POST["cel_product_{$field}"] );
    	}
    } );
    

    To retrieve values in front end, just use:

    
    $cel_products = unserialize( rwmb_meta('cel_product') );
    

    Best regards

    Tan Nguyen

    in reply to: Conditional Logic/Groups not saving properly #1421
    Anh TranAnh Tran
    Keymaster

    Thanks Sam very much for reporting this bug, we're working and release the patch for Group shortly ๐Ÿ™‚

    in reply to: Conditional Logic Between Checklist Group and Checkbox #1420
    Anh TranAnh Tran
    Keymaster

    Dear Justin,

    I've checked with and it works, can you please tell me what's version you're using and provide your code to register meta boxes and define conditional logic?

    Here's my snippet for example:

    
    add_filter( 'rwmb_meta_boxes', function( $meta_boxes )
    {
    	$meta_boxes[] = array(
    		'id' => 'brand_product',
    		'title' => 'Brands and Products',
    		'post_types' => array( 'post', 'page' ),
    		'context'	=> 'normal',
    		'priority'	=> 'high',
    		'fields' => array(
    			array(
    				'id' => 'show_checkboxlist',
    				'name' => 'Show Checkbox List',
    				'desc' => 'Show Checkbox List when this checkbox is checked',
    				'type' => 'checkbox'
    			),
    			array(
    				'id'	=> 'brand',
    				'name'	=> 'Brand',
    				'desc'	=> 'Pick Your Favourite Brand',
    				'type'	=> 'checkbox_list',
    				'options' => array(
    					'Apple' 		=> 'Apple',
    					'Google' 		=> 'Google',
    					'Microsoft' 	=> 'Microsoft'
    				),
    				'visible' => array('show_checkboxlist', true)
    			)
    		)
    	);
    
    	return $meta_boxes;
    } );
    

    Best regards

    Tan

    in reply to: Conditional Logic Between Checklist Group and Checkbox #1419
    Anh TranAnh Tran
    Keymaster

    Hi Justin, sorry for long silence, I'm checking this issue and give you an answer shortly ๐Ÿ™‚

    in reply to: image_advanced field not hidden #1410
    Anh TranAnh Tran
    Keymaster

    Glad to hear it's fixed!

    Thanks for using Meta Box.

    in reply to: Radio buttons not rendering/their value isn't recorded #1409
    Anh TranAnh Tran
    Keymaster

    This is weird, please send me info (same as in the another ticket) so I can look into it for you.

    in reply to: WSYIWYG seems to be broken when using groups - sorry to reopen #1408
    Anh TranAnh Tran
    Keymaster

    Hi, please send me info in the Contact page. I will look at the issue for you ๐Ÿ™‚

Viewing 15 posts - 3,751 through 3,765 (of 3,958 total)