Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 3,301 through 3,315 (of 3,958 total)
  • Author
    Posts
  • in reply to: Conditional Logic with validation #3467
    Anh TranAnh Tran
    Keymaster

    I see, with your case, I'd recommended:

    - A select field: Github, Gitlab, Bitbucket.

    - (Optional): Three labels: Github Username, Gitlab Username, Bitbucket Username, visible when select field equal to label.

    - A Text field: Username

    So your wp_postmeta table will cleaner because it only save 2 fields instead of 4, and the validation will works.

    Cheers!

    in reply to: if ! empty $groupvariable not working #3466
    Anh TranAnh Tran
    Keymaster

    I understand. I thought I did this in the previous version but looks like not. I will fix it so empty work.

    Thanks for noticing the bug.

    in reply to: Sortable select_advanced #3465
    Anh TranAnh Tran
    Keymaster

    Do you mean sorting options of a select_advanced field?

    in reply to: Script errors when upgrading from metabox 4.5 > 4.8 #3464
    Anh TranAnh Tran
    Keymaster

    I guess there is a JavaScript code that similar to this $( '#course_cluster[]' ) which is an invalid selector in jQuery. As you're using Conditional Logic plugin, this expression might be displayed by the plugin, it can be auto-generated by term ID or something. Can you check the source HTML code to see whatcourse_cluster is?

    in reply to: Script errors when upgrading from metabox 4.5 > 4.8 #3456
    Anh TranAnh Tran
    Keymaster

    There is no reference to course_cluster as shown in the error log. Can you add these lines into wp-config.php and check the error message again?

    define( 'WP_DEBUG', true );
    define( 'CONCATENATE_SCRIPTS', false );
    define( 'SCRIPT_DEBUG', true );

    This code tells WP to not concatenate scripts and can show us the exact place of the error.

    in reply to: Conditional Logic with validation #3454
    Anh TranAnh Tran
    Keymaster

    Dear weseo,

    Thanks for using our plugins. As your field is required, it shouldn't be hidden and vice versa, this will breaks our scripts functionality. So you can change your require validation logic if it's possible.

    Best regards

    Tan

    in reply to: Script errors when upgrading from metabox 4.5 > 4.8 #3447
    Anh TranAnh Tran
    Keymaster

    Can you post the code you use to register meta boxes and custom fields?

    in reply to: Text Autocomplete from custom post type #3441
    Anh TranAnh Tran
    Keymaster

    Unfortunately no. You can only set it searches from a fix bundle of data.

    in reply to: Conditional logic relation #3431
    Anh TranAnh Tran
    Keymaster

    Dear nicolas,

    I've tested with my site and it works. This is my meta box:

    
    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',
    		// Conditional Logic can be applied to Meta Box
    		// In this example: Show this Meta Box by default. Hide it when post format is aside
    		'hidden' => array( 'post_format', 'aside' ),
    		'fields' => array(
    			array(
    				'id'	=> 'brand',
    				'name'	=> 'Brand',
    				'desc'	=> 'Pick Your Favourite Brand',
    				'type'	=> 'select',
    				'options' => array(
    					'Apple' 		=> 'Apple',
    					'Google' 		=> 'Google',
    					'Microsoft' 	=> 'Microsoft'
    				)
    			),
    			array(
    				'id' 	=> 'apple_products',
    				'name'	=> 'Which Apple product that you love?',
    				'type'	=> 'radio',
    				'options' => array(
    					'iPhone' 	=> 'iPhone',
    					'iPad'		=> 'iPad',
    					'Macbook'	=> 'Macbook',
    					'iWatch'	=> 'iWatch'
    				),
    				// Conditional Logic can applied to fields
    				// In this example: Show this field by default, 
    				// hide it when user selected different value than 'Apple' on brand select field
    				'hidden' => array( 'brand', '!=', 'Apple' )
    			),
    
    			array(
                    'name'  => 'Price',
                    'id'    => "tan_price",
                    'desc'  => 'Input price without currency',
                    'type'  => 'text',
                    'clone' => false,
                    'size'  => 25,
                    'tab'    => 'dish',
                    // 'visible' => array( "{$prefix}menu_item_type", '!=', '0' ),
                    'hidden' => array(
                        'when' => array(
                            array( "brand", 'not in', array( 'Google', 'Microsoft'  ) ),
                            array( "post_category", 1 ),
                        ),
                        'relation' => 'or'
                    ),
                ),
    		)
    	);
    	return $meta_boxes;
    } );
    
    

    It hidden when either brand is Apple or post_category is 1.

    If this problem still persist, can you please send me your website credentials and FTP info via contact form so I can login your website to check?

    Best regards,

    Tan

    in reply to: โœ…Seem to be having issues in child theme #3426
    Anh TranAnh Tran
    Keymaster

    DS conflicts with my XAMPP somehow. I couldn't make it run :(.

    in reply to: โœ…Seem to be having issues in child theme #3424
    Anh TranAnh Tran
    Keymaster

    I'm downloading DS to test ๐Ÿ™‚

    in reply to: โœ…Seem to be having issues in child theme #3422
    Anh TranAnh Tran
    Keymaster

    Lol. I don't run VVV, neither. It's more complicated than it should be. On Mac, I'm using Valet which is super simple.

    On Windows, I think XAMPP is more stable than other software. You should think switching to it ๐Ÿ™‚

    in reply to: โœ…Seem to be having issues in child theme #3419
    Anh TranAnh Tran
    Keymaster

    I have no idea with DesktopServer. I'm using XAMPP locally and it works. I thought DesktopSever is similar to XAMPP as they're just the wrapper for Apache, MySQL and PHP.

    in reply to: โœ…Seem to be having issues in child theme #3417
    Anh TranAnh Tran
    Keymaster

    Maybe in the Apache error log?

    Also, try copy and paste the code above directly into functions.php of the child theme. I did that and it worked.

    in reply to: WP REST API #3415
    Anh TranAnh Tran
    Keymaster

    It's now available on wordpress.org: https://wordpress.org/plugins/mb-rest-api/

Viewing 15 posts - 3,301 through 3,315 (of 3,958 total)