Custom fields: return both values, yes and no

This topic contains 9 replies, has 3 voices, and was last updated by  milettic 7 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #283910

    milettic
    Expired Member
    Post count: 240

    Hi all,
    We had discussed about this funktionality here
    But after these last updates nothing is changed, is there some way to return both values?
    Thank you!

    #284099

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I asked to Stiofan to follow up on his offer to give you some examples.

    Thanks for your patience,

    #284587

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Yes it can be done now, is it just one field you want this to apply to or all multiselect fields?

    Stiofan

    #284610

    milettic
    Expired Member
    Post count: 240

    Hi, great!
    All fields and not only multiselect. I use checkboxes mostly.

    I use checkboxes because they are stored in database columns separately, I think for future may be better choice, i am not sure if i am in right… don’t know
    Thank you

    #284859

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    hmm, there is no way to do it globally, the solution involves replacing the function that outputs the field type.

    For example you would remove this action and replace it with your own:

    add_filter('geodir_custom_field_output_multiselect','geodir_cf_multiselect',10,3);

    Stiofan

    #284863

    milettic
    Expired Member
    Post count: 240

    please more help, i don’t understand 🙁
    or one example?
    Thank you

    #285709

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This is an example for multiselects, first you would add this to functions.php

    Then you would add a css rule to make it strike through

    .gd-not-set {text-decoration: line-through;}

    Thanks,

    Stiofan

    #289866

    milettic
    Expired Member
    Post count: 240

    Hi,
    Thank you for providing me this example. I have tried to implement this with checkboxes but without success…
    Could you please provide me one example with checkboxes?
    Think you

    #291476

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Checkbox example:

    #296143

    milettic
    Expired Member
    Post count: 240

    Works great, thanks!

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket