phoneNumber plugin on ajax data from editor
phoneNumber plugin on ajax data from editor
Zefx
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
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
Actually just the search filtering plug in:
https://datatables.net/plug-ins/filtering/type-based/phoneNumber
No console errors, just doesn't match.
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