Hi ,
i want create custom columns to display a custome text depend on the value
for ex.. the column for user active , and this table filed conaine integer value 1 or 0 , so when the value is 1 it will show text (Activated) in the column value ..
how i can do it ?
post by wesambeshir on Sep 11, 2021
post by mariel_alberto on Sep 11, 2021
Hello there
Maybe you do not understand your problem well, but if the issue is in true-false values
Field Type
Field Type 1.x
Field Type 2.x
post by larasmith on Sep 14, 2021
Hi @wesambeshir!
For this you can either use field types or set relation whichever is convenient for you. Take note that in set relation, it would require you to create another table wherein your data would relate to.
For fieldtypes using GroceryCRUD Community Edition you can do this:
(It is assumed here that your field name was “useractive”)
$crud->field_type('useractive','dropdown',
array('0' => 'Inactive', '1' => 'Active'));
For fieldtypes using GroceryCRUD Enterprise Edition you can do this:
(It is assumed here that your field name was “useractive”)
$crud->fieldType('useractive', 'dropdown_search', [
'0' => 'Inactive',
'1' => 'Active'
]);
For set relation using GroceryCRUD Community Edition you can do this:
(It is assumed here that you have a table called tblboolean and it has a field called bool_Name which contains records: Inactive and Active)
$crud->set_relation('useractive_id','tblboolean','bool_Name');
For set relation using GroceryCRUD Enterprise Edition you can do this:
(It is assumed here that you have a table called tblboolean and it has a field called bool_Name which contains records: Inactive and Active)
$crud->setRelation('useractive_id','tblboolean','bool_Name')
I hope this helps you out ![]()
post by aanhaservices on Oct 14, 2021
Select Add column>custom column.the custom column dialog box appears.enter a new column name. insert a column into the custom column formula box by selecting a column from the available columns list, and then selecting insert.
New & Unread Topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Using `unsetPagination()` but limit is still applied |
|
3 | 620 | Apr 12 |
| [RESOLVED] Error in “validate.php” in the “_get_language_mapping()” function |
|
10 | 1.9k | Mar 31 |
| The “uniqueFields” function only throws an error in English |
|
0 | 847 | Jan 19 |
| Function fieldType with parameter ‘multiselect_searchable’. and groupFields |
|
1 | 544 | Apr 9 |
| Group Fields configuration |
|
0 | 409 | Jun 3 |