phoneNumber plugin on ajax data from editor

phoneNumber plugin on ajax data from editor

ZefxZefx Posts: 8Questions: 4Answers: 1

Hi
The phoneNumber plugin works perfectly for me on inline html tables. But isn't working on ajax data coming from Editor... should I expect it to?
If it would be expected to work I can post a test case...
Thanks!
Joe

Answers

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954

    Are you referring to this plugin?

    It should work whether using inline or form editing. The data source shouldn't matter. Have you looked for errors in the browser's console?

    Kevin

  • ZefxZefx Posts: 8Questions: 4Answers: 1

    Actually just the search filtering plug in:
    https://datatables.net/plug-ins/filtering/type-based/phoneNumber

    No console errors, just doesn't match.

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954
    edited January 2023

    Oh, the problem is with Datatables filtering not with using the Editor. The problem will be with the data in the column you are applying the type: 'phoneNumber' to. What is the format of your phone numbers? The plugin handles spaces and dashes in the number. If you have other characters like parenthesis then you will need to update the regex statement (data.replace(/[ \-]/g, '') to remove them.

    Here is an example with Javascript sourced data which will be similar to ajax data.
    http://live.datatables.net/wohugodo/1/edit

    If you still need help please post an example of your data that doesn't work. Better is a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

Sign In or Register to comment.