Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,176 through 2,190 (of 3,702 total)
  • Author
    Posts
  • in reply to: image_select value not working #9493
    Anh TranAnh Tran
    Keymaster

    Sorry, I missed that. I thought the code is the code that you're using.

    Yes, there's a bug with the image_select field. It uses radio for inputs, so we can't use #field_id in our rules. Please change it to [name=rnr_wr_pagetype] and update the plugin.

    in reply to: image_select value not working #9486
    Anh TranAnh Tran
    Keymaster

    Hello,

    I've checked your code and it works for me. Here is the video:

    https://imgur.com/a/J5HLUVi

    Please check the $prefix again. Probably you missed it.

    Anh TranAnh Tran
    Keymaster

    Hello,

    The MB Frontend Submission uses WordPress wp_insert_post() and wp_update_post() to create/update a post. Both functions fire the save_post hook. So, your code still works in the frontend. Please try and let me know how it goes.

    in reply to: How to set a upload directory for file_upload #9481
    Anh TranAnh Tran
    Keymaster

    I see. The code that I posted above works for whole website, because that's the only PHP hook WordPress provides. And it's site-wide.

    If your CPT doesn't have any other upload fields, then you can add some PHP checks to make sure the filter runs only for that CPT only. That might work.

    And if you can hook into the ajax process, please share with us. I'm curious how to do that, too.

    in reply to: Hide Metabox Field on Custom Frontend Form #9480
    Anh TranAnh Tran
    Keymaster

    Hi, you can use a hidden field for that purpose. Alternatively you can hide it with CSS. Or more advanced - use MB Conditional Logic to hide it.

    in reply to: How to show up the custom column in grouped meta #9466
    Anh TranAnh Tran
    Keymaster

    Hello,

    Regarding the code to show a sub-field inside a group, your code is correct and that is a nice approach. I guest that's the best way to do it.

    Sorting seems not to be doable for group values, unfortunately. The quick edit is not available at the moment, neither (we haven't done that for normal fields as well).

    Regrading your data, I think you can just create a group called variation (a combination, you can find any better name) and it has 3 sub-fields:

    • Size: can be a select field if number of sizes are limited
    • Batch: a text field or select field (if you have predefined batches)
    • Amount of bottles: number field
    • Price

    Then you can show those info in the admin columns in a similar way that you already did above (with similar code).

    in reply to: Assign category #9465
    Anh TranAnh Tran
    Keymaster

    Hi,

    I'm not really clear about the question. Do you mean automatically assigning category for some posts selected in a settings page?

    in reply to: Basic post type relationship dont work. #9464
    Anh TranAnh Tran
    Keymaster

    Hello, the query to get connected posts seems to be ok. What error did you see? Can you please post the code that you use it and see it failed?

    in reply to: Is there a repeater field like acf? #9463
    Anh TranAnh Tran
    Keymaster

    Hello,

    Yes, we do. Please use MB Group for repeater field. You can define any sub-fields inside, even another groups.

    For flexible repeater field, please use MB Group with MB Conditional Logic to load sub-fields based on some condition.

    in reply to: New Google maps pricing policy and MB geolocation #9462
    Anh TranAnh Tran
    Keymaster

    Hi Michele and David,

    Thanks a lot for your inputs. The inconsistent and unclear of information from Google is a big concern to us.

    I'll check the OSM next week and will try to provide a quick workaround.

    in reply to: New Google maps pricing policy and MB geolocation #9450
    Anh TranAnh Tran
    Keymaster

    I got an email from Google 2 days ago regarding the same problem. It says that Google still provide free tier for user. The free usage is equivalent to $200 per month. Adding credit card to your billing info will be able to add a coupon to your account that increases the limit to $500 per month.

    I attached the screenshots here so you can see the details:

    https://imgur.com/gallery/h200Jhk

    One big note in this announcement is that all fields that don’t have API key won’t work any longer.

    So, I think in short terms, the Google Maps field still works if you already have a API key. However, in long term, we should figure out a better way. I’ll check Open Street Maps to see if we can integrate it.

    Anh TranAnh Tran
    Keymaster

    Sorry, can you try again now?

    in reply to: Change confirmation message after submission #9427
    Anh TranAnh Tran
    Keymaster

    Hi,

    Why don't you use the confirmation attribute of the shortcode? It's much easier and no coding required.

    Anh TranAnh Tran
    Keymaster

    Hi again,

    We've just updated the extension with able to save NULL value to the table. Now if the value is an empty string or empty array, it will be saved as NULL. Please update the extension and let us know how it goes.

    in reply to: How to set a upload directory for file_upload #9416
    Anh TranAnh Tran
    Keymaster

    Hello,

    I've tested with upload_dir filter and it works for Meta Box. However, it's important to note that the documentation on Codex is not accurate. If you use exactly what in the Codex, e.g.:

    add_filter( 'upload_dir', function ( $param ) {
        $mydir = '/awesome';
        $param['path'] = $param['path'] . $mydir;
        $param['url'] = $param['url'] . $mydir;
    
        return $param;
    } );

    Then it will work.

    However, if you want to move to a new directory other than uploads, you need to change not only path and url, but also basedir and baseurl, like this:

    add_filter( 'upload_dir', function ( $param ) {
        $param['basedir'] = wp_normalize_path( ABSPATH . 'custom-uploads' );
        $param['baseurl'] = home_url( '/custom-uploads' );
        $param['path']    = $param['basedir'];
        $param['url']     = $param['baseurl'];
        $param['subdir']  = '';
    
        return $param;
    } );

    The code above will upload files to custom-uploads folder in the root directory. As you see, basedir and baseurl, subdir are used to set the correct URL of the files.

    Please try that in your case and let me know how it works.

Viewing 15 posts - 2,176 through 2,190 (of 3,702 total)