You must be logged in to add a topic or comment.
Login
Forum Management

xCRUD Support Forum

#Description
Actions
1 How to implement custom validation in xCRUD?
1 month agoTags: Data validation,xCRUD Category: xCRUD 1.6, 1.7 By pato

Comments

For custom validation in xCRUD, you can use the validation method in your model. Here's a simple example:

    $xcrud->validation_required('lastName',2)->validation_required('firstName',2)->validation_required('jobTitle');
    $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
View Topic
2 Best practices for using xCRUD with AJAX
1 month agoTags: AJAX,xCRUD Category: xCRUD 1.6, 1.7 By pato

Comments

When using xCRUD with AJAX, consider implementing the Xcrud.reload() method to refresh the data without a full page reload. Also, ensure your server responds with JSON to make handling easier on the frontend.


1 month ago - 3 Likes

3 1
View Topic
3 How to customize xCRUD data output?
1 month agoTags: customization,xCRUD Category: xCRUD 1.6, 1.7 By pato

Comments

To customize the output format, you can use the column_callback method in your xCRUD instance. This allows you to manipulate how each column is displayed:

$xcrud->column_callback('column_name', 'custom_function');

Define custom_function to format the output as needed.


1 month ago - 4 Likes

4 0
View Topic
4 Troubleshooting xCRUD installation issues
1 month agoTags: installation,xCRUD Category: xCRUD 1.6, 1.7 By pato

Comments

Installation issues can often be related to permissions or missing dependencies. Ensure all required PHP extensions are enabled. Check your server logs for any specific errors during installation.


1 month ago - 2 Likes

2 0
View Topic
5 How to create a multilingual site using xCRUD?
3 weeks agoTags: multilingual,xCRUD,translation Category: xCRUD 1.6, 1.7 By pato

Comments

For multilingual support, consider using xCRUD's built-in translation features. You can define translation strings in a separate file and load them based on user preferences:

$xcrud->language('fr');

This will switch the interface to French, for example.


3 weeks ago - 3 Likes

3 1
View Topic
6 The verification key is out of date
3 weeks agoCategory: xCRUD 1.6, 1.7 By pato

Comments

Great review
3 weeks ago - 12 Likes

12 10
View Topic
7 Does anyone know how to reload a xcrud dataset without reloading the whole page?
3 weeks agoCategory: xCRUD 1.6, 1.7 By pato

Comments

Yes, this works perfect


3 weeks ago - 1 Likes

1 0
View Topic
8 Is there a way to create a custom add button outside the grid? I'd like to replace the "+ Add" that appears above the grid, but just for one page, but I can't figure that out. Any help would be greatly appreciated!! Thanks!!
3 weeks agoCategory: xCRUD 1.6, 1.7 By pato

No comments

View Topic
9 Hello guys, After once again scratching my head I found again some funny things inside xcrud: in xcrud.php, at the top, you'll see the default timezone set to:
3 weeks agoCategory: xCRUD 1.6, 1.7 By pato

No comments

View Topic
10 Xcrud button to search for predefined word and predefined column
3 weeks agoTags: search Category: xCRUD 1.6, 1.7 By pato

Comments

I solved it myself with my own little function. It might not be the slickest solution but it works well and like this you can have direct any buttons or menu entries with automatic search in specific columns or all column for phrases.

You then connect your button/link with a simple onclick or like this: search_xcrud('phrase','colname');

Here the function:

function search_xcrud(phrase, col=''){

  console.log('Xcrud Search Started: ' + phrase+ ' Col: ' + col);
  $('input[name ="phrase"]').val(phrase);
  $('select[name ="column"]').val(col);
  $( '.search-go' ).trigger( "click" );

}

You can use the function without "col" and than the function searches in all columns. If you search for a specific column you need to enter the name of the table with the exact label as used in $xcrud->columns!

Example: If you use for example table "clients" with the columns id,name,age.

$xcrud->table('Clients');
$xcrud->columns('id, name, age');

You would call the function like this:

search_xcrud('myphrase','Clients.name'); // incl. tablename and colname! 

If you have doubts about the right column check your source code and look for the select box with the name "column" for all your options in this situation. This depends on the use of relations etc. and might change in this cases.

I hope this helps others since I was looking since quite some time for a easy solution without somehow touching the original Xcrud code. PS: Xcrud is fantastic!

if you have any questions let me know.

 


3 weeks ago - 0 Likes

0 0
View Topic
Search