Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,176 through 2,190 (of 3,708 total)
  • Author
    Posts
  • in reply to: MB Frontend Submission #9508
    Anh TranAnh Tran
    Keymaster

    Hi,

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

    https://imgur.com/a/Wn11Wmt

    Can you please check again? Probably there's some hooks elsewhere that modifies the requests?

    in reply to: Custom table save error #9502
    Anh TranAnh Tran
    Keymaster

    Hello,

    I've just tested again with the custom table for only 1 CPT. When I save another CPT, there's nothing happened. Can you please check again? Maybe there's somewhere else that you use the same CPT.

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

    I'm not sure about the quick edit for groups. It's kind of custom output + JavaScript. As long as you format the submitted data in correct way (e.g. array of sub-fields values), it might work. So, please be very careful about the data, or you might lost them.

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

    Hello,

    I've just did a similar test and it works for me. Do you have any filter/code that change the query? Some kind of hooks to pre_get_posts, query_vars, etc.?

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

    That's cool. Is the global $post object is available and set to the being edited post inside the filter?

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

    Yes, you can do that. However, because PHP doesn't allow to use same keys in an array, you need to change the selector to something else (while still make it work):

    'input_value' => array(
        'input[name=rnr_wr_pagetype]' => 'st2',
        'input[name*=rnr_wr_pagetype]' => 'st3',
    ),
    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.

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