Unfortunately this is not possible with built-in functionalities, and it can be done with little customization. I have wrote little jQuery snippet that you can add on Custom wpDataTables JS field on wpDataTables settings page. With this jQuery snippet If length of one-line edit input field is 10 or more characters OK and Apply button will be disabled. This maybe is not the best solution, because if somebody know to Inspect element on your page and remove disabled attribute of button he can add data to your table. The better solution will be if you can do that on back-end. For this jQuery snippet you have just to change names of your input fields.
need help, can we have a constraint to add maximum 10 digits in one-line edit string from the front end
Hi anuraag,
Thank you for your purchase.
Unfortunately this is not possible with built-in functionalities, and it can be done with little customization. I have wrote little jQuery snippet that you can add on Custom wpDataTables JS field on wpDataTables settings page. With this jQuery snippet If length of one-line edit input field is 10 or more characters OK and Apply button will be disabled. This maybe is not the best solution, because if somebody know to Inspect element on your page and remove disabled attribute of button he can add data to your table. The better solution will be if you can do that on back-end. For this jQuery snippet you have just to change names of your input fields.
If you are interested in back-end customization we can offer you our paid customization service.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables