Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,626 through 2,640 (of 3,702 total)
  • Author
    Posts
  • in reply to: Sometimes user meta are not saved #6987
    Anh TranAnh Tran
    Keymaster

    Strange, I've just tested with your code and it works. Do you have any "check" code that runs along with (maybe before) the code for Meta Box?

    in reply to: Creating a custom table API #6986
    Anh TranAnh Tran
    Keymaster

    Hi,

    It's recommended to use a hook like 'plugins_loaded', 'init' or better - activation hook to create a new table. In case of a theme, you can hook into 'init', like this:

    add_action( 'init', 'prefix_create_table' );
    function prefix_create_table() {
        if ( ! class_exists( 'MB_Custom_Table_API' ) ) {
            return;
        }
        MB_Custom_Table_API::create( 'my_custom_table', array(
            'address' => 'TEXT NOT NULL',
            'phone'   => 'TEXT NOT NULL',
            'email'   => 'TEXT NOT NULL',
        ), array( 'email' ) );
    }

    For more info, please see the sub-section E. in the section Notes of the documentation.

    in reply to: 'std' doesn't work in settings page #6985
    Anh TranAnh Tran
    Keymaster

    Hi,

    The 'std' value works only the first time, e.g. when you haven't save any settings. In your case, if you delete the field value, then the plugin should "remember" your choice - whatever you did - which is the empty value in this case. It would be much confused if it shows the 'std' value, because two things: 1) you wonder where it comes from and 2) you can't actually save an empty value.

    in reply to: Show meta box only for top parent page ID #6984
    Anh TranAnh Tran
    Keymaster

    Can I see your function for test top parent page ID? Can you post your code?

    in reply to: Image_Select not saving #6950
    Anh TranAnh Tran
    Keymaster

    Hi,

    I've just tried your code with Conditional Logic plugin enabled. Everything works as expected.

    Maybe the problem is in the custom JavaScript code, which might breaks the JS code in the plugin(s). Can you please check when exactly the post doesn't save image_select value?

    in reply to: How to set meta_query of Group cloneable fields for search #6949
    Anh TranAnh Tran
    Keymaster

    Hi,

    When you use cloneable fields (whether it's a group or not), the data is saved as a serialized array in the database. That makes the default meta_query doesn't work when search for posts by meta value.

    In this case, you need to use a plugin like SearchWP.

    in reply to: Reset All Meta Values #6948
    Anh TranAnh Tran
    Keymaster

    Hi,

    You can run a SQL query like this:

    DELETE FROM wp_postmeta WHERE meta_key IN ('field1', 'field2');

    in reply to: I'd like a refund please #6823
    Anh TranAnh Tran
    Keymaster

    No problem, refund is sent.

    If you change your mind, we'll be happy to help.

    in reply to: Multiple file_upload fields #6772
    Anh TranAnh Tran
    Keymaster

    I'm afraid this is a hard problem. As the file_upload uses Media Library to upload files, all it does is calling the popup, passing the required parameters for the uploader (mime types, file size, etc.) and parsing the returned data. I've just checked the code and couldn't find anything related to the current field, because the uploader doesn't need that. But can you try print_r everything global ($_POST, $_GET, etc.) when filtering? Probably I'm missing something.

    Anh TranAnh Tran
    Keymaster

    Hi,

    I've just tested your code and here is the recorded screen:

    http://imgur.com/l7jFZoq

    I guess the problem is caused by cached JavaScript. In every new version of Group extension, most of the changes are in JavaScript file. So please try clearing browser cache (or Ctrl-F5) and check it again.

    Thanks,
    Anh

    in reply to: Redirect After Form Submission from Front-end Modal #6767
    Anh TranAnh Tran
    Keymaster

    The URL param is used to make sure if users reload the current page, no info is submitted again. It’s quite a common thing in PHP form.

    I’m not clear about this thing: when users edit a second meta box, it should be the 2nd form, which is different from the previous form. So it must have different div for the submit status and couldn’t show the previous messange.

    Can you plz make a screenshot so I can look at the issue closer?

    Thanks

    in reply to: MB Group 1.0.6 throws an error and does not render fields #6766
    Anh TranAnh Tran
    Keymaster

    Can you please update to the latest version? It’s already 1.2.11 now.

    in reply to: Applying class to output #6765
    Anh TranAnh Tran
    Keymaster

    @ludovic.meyer: Cool trick! Thanks.

    in reply to: Multiple file_upload fields #6764
    Anh TranAnh Tran
    Keymaster

    Can I ask how do you change upload folder? Do you use WordPress hooks?

    in reply to: Setting field order #6763
    Anh TranAnh Tran
    Keymaster

    Hi Johnny,

    You can use PHP function array_splice to insert new fields at any position, like this:

    $field_1 = array(...);
    $position = 1;
    array_splice( $meta_boxes[$k]['fields'], $position, 1, array( $field_1 ) );
    // Do the same for $field_2, etc.

    For more info, please see this docs.

Viewing 15 posts - 2,626 through 2,640 (of 3,702 total)