Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,606 through 1,620 (of 3,707 total)
  • Author
    Posts
  • in reply to: Displaying Form Data as a visual chart #12287
    Anh TranAnh Tran
    Keymaster

    Hi Neil,

    As I answer in the other topic, showing the value of custom fields in a different way need some coding. In this case, you want to display in a chart or graph, then the steps will be:

    • Download a chart/graph library required CSS/JS. Depends on which library you use, the files are different.
    • Enqueue a chart/graph library's JS/CSS. This can be done in the theme with wp_enqueue_script and wp_enqueue_style.
    • Get the field values (via helper functions).
    • Output the values in the format required by the chart/graph library. If they required the data in JavaScript, you need to use wp_localize_script to enqueue the data.
    • Write some custom JS to initialize the graph/chart.

    That might sound complicated, but the whole process is just trying to pass the data of custom fields to the JS of the library. Depends on which library you use, the code might be different.

    in reply to: Using Field Values in Calculations - 2 questions #12286
    Anh TranAnh Tran
    Keymaster

    Hi Neil,

    Question #1 – how can I implement fields that recognize numerical input as a percentage? I am using the number field now….

    It actually doesn't. You need to write some description to the field to let users know it's a percentage.

    Question #2 – how do I perform calculations and then display the result?

    When you insert the code to the front end, please add some calculation before that:

    $value = rwmb_meta( 'percentage' );
    $value = $value / 100 * $another_field_value;
    echo $value;

    If you're using a page builder like Beaver Builder, I'd suggest writing a custom shortcode to put into a text module in BB. The shortcode might be like this (put in functions.php):

    add_shortcode( 'your_percentage', function( $atts, $content ) {
        $value = rwmb_meta( 'percentage' );
        $value = $value / 100 * $another_field_value;
        return $value;
    } );

    In a text module in BB, simply insert [your_percentage] and your result will appear.

    in reply to: Creating Custom Field - Telephone #12285
    Anh TranAnh Tran
    Keymaster

    Hi Neil,

    1. Yes, it's possible. Please just change the type from text to tel and you already have telephone field. It's actually a HTML5 input type and I already covered it here.

    2. The MB Builder could not be extended that way. If you create a new field type, it's available for coding only. It won't show in the Builder.

    Anh TranAnh Tran
    Keymaster

    Hi Saqib, we're already working on this issue. We'll let you know when it's done!

    in reply to: exclude some posts from post query #12245
    Anh TranAnh Tran
    Keymaster

    Hello,

    Let me check it again. Thanks for your feedback.

    in reply to: ℹ️Creating a gutenberg metabox block #12239
    Anh TranAnh Tran
    Keymaster

    Hello,

    This is on our plan. However, Gutenberg is not stable yet and there're some serious issues (on Github), we haven't started yet. But this is definitely what we're going to do.

    in reply to: uploaded Image/file fields gets wiped in WP admin. #12187
    Anh TranAnh Tran
    Keymaster

    Hi Calpaq,

    Can you give me your code to check again on my localhost? Maybe there's something that I didn't think about before.

    Anh TranAnh Tran
    Keymaster

    Hi Mauro,

    Can you please contact FacetWP and ask for help? This is a technical question and relates with how things work in FacetWP.

    in reply to: WooCommerce hide fields on product_cat ids not working #12180
    Anh TranAnh Tran
    Keymaster

    Hi,

    I see you're using the syntax for MB Conditional Logic instead of Meta Box Show Hide. This code is created with MB Builder, which only supports Conditional Logic. So to use Show Hide, please modify the syntax to match the rules here.

    If you want to use Conditional Logic, please note that the taxonomy value is an array, so you should use in or contains, like this:

    array( 'tax_input[product_cat]', 'contains', 18 )

    in reply to: Select custom field and generate PDF #12179
    Anh TranAnh Tran
    Keymaster

    I haven't done anything like that. Looks like it requires custom coding.

    in reply to: Image/file field not uploading more than 3 fields #12178
    Anh TranAnh Tran
    Keymaster

    Hi Calpaq,

    I think the cause is max_input_vars settings in PHP. Please read this post for solution.

    in reply to: uploaded Image/file fields gets wiped in WP admin. #12177
    Anh TranAnh Tran
    Keymaster

    Hi Calpaq,

    Can you please check this answer? This might be the same problem.

    in reply to: Conditional Logic and Group extensions #12176
    Anh TranAnh Tran
    Keymaster

    Can you show me a screenshot? In my thought, when a group is collapsed, all sub-fields are hidden. So no matter the condition is satisfied or not, we still can't see the sub-fields.

    in reply to: WYSIWYG editor going blank on Group reorder #12175
    Anh TranAnh Tran
    Keymaster

    Hey guys, I've just fixed this issue on Github. Can you please test it?

    in reply to: Custom Table - Group NULL #12157
    Anh TranAnh Tran
    Keymaster

    Hi David,

    Thanks a lot for your feedback.

    When you submit a post, the Group has a mechanism to filter all the sub-fields' values to remove empty values (to save space). So, if no value is entered, that means the group doesn't have any value. I'll check why it saves NULL in the DB.

    I also updated the MB Custom Table docs to include your points. Thanks for helping 🙂

Viewing 15 posts - 1,606 through 1,620 (of 3,707 total)