I am using Xcrud Version 1.7 https://www.xcrud.net/
And would like use a button to search/filter for a predefined keyword and column. In the Xcrud Documentation I found buttons with tasks like edit and modal but nothing with search.
the idea is something like this
<button onclick="Xcrud.request('.xcrud-ajax',Xcrud.list_data('.xcrud-ajax',{task:'search',field:keyword}))">Filter Keyword</button>
The documentation has some button functions but I cant get something work with search. https://www.xcrud.net/demos/index.php?page=js_tricks&theme=default
I need somehow a solution to filter the table data without reloading the entire page and their for use the js function from xcrud instead of loading the entire page again. Maybe somebody worked with xcrud already and has an idea.
thank you in advance
For custom validation in xCRUD, you can use the
validation
method in your model. Here's a simple example:$xcrud
->validation_required(
'email'
);
$xcrud
->validation_pattern(
'email'
,
'email'
)->validation_pattern(
'extension'
,
'alpha_numeric'
)->validation_pattern(
'officeCode'
,
'natural'
);
This will ensure the field is not empty before saving. Hope this helps!
3 weeks ago - 5 Likes 5 0