Support » Plugin: TablePress » Display button if searched string not found

  • Resolved besirsebib

    (@besirsebib)


    Hello,
    Good day,
    Thank you for making such a great useful plugin,

    I would like to display a button if “No matching records found”,

    is this possible ?

    Thanks and regards,

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I’m not sure that I understand. Where exactly do you want this, and which filtering do you use?

    Regards,
    Tobias

    Thread Starter besirsebib

    (@besirsebib)

    Hi,

    Thank you for the quick response,

    I want an action to be made if the search returns no record,
    so i thought if there is a button that can be displayed i can link it to an action.

    i have an example in the following page,
    https://it.turksey.com/portal-test/

    if you click the “Book an Appointment” button it displays a calendar,
    I want the button to be displayed only if there is no record found .

    is this possible ?

    Thanks and Regards,
    Besir

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    unfortunately, I don’t know a solution to that, sorry. You will likely need some custom JavaScript implementation for this.

    Regards,
    Tobias

    Thread Starter besirsebib

    (@besirsebib)

    Hi,

    Ok , I have another question if i may,

    Is it possible to display search result only after pressing enter key , instead of instant search?
    And is it possible to trigger a script after that ?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    you could try checking the approach from https://wordpress.org/support/topic/i-want-the-table-to-be-invisible-until-filter-is-applied/#post-4272342 for this. If you modify the JS code, you should be able to call other JS code as well.

    Regards,
    Tobias

    Thread Starter besirsebib

    (@besirsebib)

    I will try that for sure,
    Many thanks 😊

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! πŸ™‚ Good to hear that this helped!

    Best wishes,
    Tobias

    Thread Starter besirsebib

    (@besirsebib)

    Hello Tobias,

    It is working now , thank you for the help,

    one thing that I could not manage to do , search result validation!
    how to check if the search result is null ? could you please help ?

    Thanks and Regards,
    Besir

    Thread Starter besirsebib

    (@besirsebib)

    No worries , I found it πŸ˜€
    $(‘.dataTables_empty’).text() == “No matching records found”)

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! πŸ™‚ Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter besirsebib

    (@besirsebib)

    Sure , I will πŸ˜€

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks, I really appreciate it!

    Best wishes,
    Tobias

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Display button if searched string not found’ is closed to new replies.