• Resolved abahalkar

    (@abahalkar)


    Hello Team,

    Thanks for such a great plugin and hope you are doing well in such a pandemic situation.

    We have three contain, is, and like search mode for the text box field by default.

    Generally, we filter data using

    NOT

    operator in query. But unfortunately not found not-operator option in search form.

    I want to add not like or not contain condition filter in search mode for the text box field.

    I have tried and edited code to add that functionality but code modification didn’t work.

    I am able to add a drop-down option in search mode for the text field and add not operator in SQL query by modification code in bps-xprofile.php and bps-fields.php files.

    Please find attached the modified files and let me know where I have wrong or missed? how can I add that functionality? or you can add and update that functionality in the next version.

    Kindly find the modified files here.
    https://themestudio.org/wp-content/uploads/2020/09/modified-files.zip

    Thanks
    Aniket

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    Hello abahalkar,

    I’ll need a few days to study your code, and I’ll get back to you.

    However I can mention a problem I ran into while trying to implement this feature. Suppose you are looking for members whose City field “does not contain” London. Do you want to find users whose field is filled in and does not contain London, or do you also need to find users whose field is empty?

    Thread Starter abahalkar

    (@abahalkar)

    Hello Andrea,

    I am really thankful and appreciate your quick reply.

    If the user gets fetched/listed even kept his field empty then this feature would be great, but if it’s only found when the field has filled then that would be also fine for me time being.

    I need “does not contain” functionality/features as soon as.

    Kindly try to add this functionality soon.

    Thanks once again.

    Thanks & Be safe
    Aniket

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hello abahalkar,

    I had a look at your code and your approach does work, if you use internal filter names without spaces, i.e. ‘not_contains’ instead of ‘not contains’.

    Please try to make this correction and your code will work fine. I’m unable to release this feature right now, but it’s high on my to-do list.

    Thread Starter abahalkar

    (@abahalkar)

    Hello Andrea,

    Thank you very much! The code is working now.

    I really appreciate your quick as well as kind response and support.

    Hope soon we will get this functionality soon in new versions.

    In past, I have added a time field. I would like to share that code also with you for your reference or you may add the time field in the future version.

    Thanks once again and be a safe
    Aniket

    Plugin Author Andrea Tarantini

    (@dontdream)

    Hi Aniket,

    You are welcome! I’d like to see your implementation of the time field, if you wish you can send it to my address [email protected]

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Want to add Not Like or Not Contain search mode for text field’ is closed to new replies.