Home Forums Plugin Support WP User Frontend Pro Checkbox/Multiselect values stores as string value

This topic is: not resolved

This topic contains 9 replies, has 4 voices, and was last updated by  Nayem 4 years, 1 month ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #38419

    Vladimir
    Member
    Post count: 26

    I need to have the checkbox and/or multiselect values from the form fields to be stored as individual entities as I need to add a search filter. However, at the moment the values are stored as a string. So if I have a checkbox list of say

    • BMW
    • Audi
    • Mercedes

    and I check all of them, the post meta is BMW| Audi| Mercedes
    This is not good. Please advise on fix ASAP.

    Thanks

    #38534

    towhid
    Participant
    Post count: 4505

    Hello Vladimir,

    I will discuss about this issue with our developer team. Hope I will come back to you a right solutions.

    Thank You ๐Ÿ™‚

    #38555

    Vladimir
    Member
    Post count: 26

    Please do – I need to be able to have each value separated so it could be used for filtering.

    Thanks

    #38626

    towhid
    Participant
    Post count: 4505

    Hello Vladimir,

    Yes it is possible to split the string. Please open wp-user-frontend/wpuf-functions.php and find below line, where you need to modify.

    $value = get_post_meta( $post->ID, $attr['name'] );
    
                    $new = implode( ', ', $value );

    To attain that feature you need to customize by yourself or you can hire a developer.

    Thank You ๐Ÿ™‚

    #38768

    Vladimir
    Member
    Post count: 26

    This is crazy! The checkbox acts as a Radio Button and stores as a single value. When presenting on the page, if multiple values are selected it shows a single string with the separator included. This should be serialized – it's not right to leave it like this. Please let me know if you plan on fixing this and when???

    #38837

    towhid
    Participant
    Post count: 4505

    Hello Vladimir,

    I am really sorry to say that we do not have this plan to serialize that data right how. I have given you an instruction my last post. You can try your own or you can hire a developer.

    Thank You ๐Ÿ™‚

    #38853

    Vladimir
    Member
    Post count: 26

    Regardless of logic or not – you provide code which is used to display field values. Do you and the developers feel that when a Checkbox field is to be displayed, the best way to showcase all selected checkboxes in a field is BMW| Mercedes| Audi ? shouldn't it be a UL>LI or something?

    #38996

    towhid
    Participant
    Post count: 4505

    Hello Vladimir,

    Yes, yes are right and we are not arguing with you. The code I have provided to you is a clue that how values can be access by get_post_meta function. When you have certain fields values contain in a variable you can show that values any order and any layout.

    Thank You ๐Ÿ™‚

    #40409

    Stacey
    Member
    Post count: 1

    I also have this issue. I paid for this plugin as a ‘Pro' plugin and am surprised to find that you don't handle checkboxes properly.

    #40465

    Nayem
    Moderator
    Post count: 6480

    Hello Stacey,

    You have posted here- https://wedevs.com/support/topic/checkboxes-dont-save-in-database-same-way-as-creating-on-the-back-end/. Please try to manage your issue in one topic. It is helpful for both of us.

    Thanks.

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Checkbox/Multiselect values stores as string value’ is closed to new replies.