GroceryCRUD - ordering the fields list (not ordering the actual data, just the order of the fields)

StackOverflow https://stackoverflow.com/questions/13078667

  •  14-07-2021
  •  | 
  •  

Frage

In GroceryCRUD i am getting the data from a table with these fields (as they appear in order in MYSQL)

id,
date_added,
views,
outhits,
clicks,
title,
description

and i want title + description to be at the top of the form when entering new rows or editing rows. how can this be done?

War es hilfreich?

Lösung

I solved this by using the columns() method and specifying the order in that list so in your case, try:

$this->grocery_crud->columns('title',
                             'description',
                             'id',
                             'date_added',
                             'views',
                             'outhits',
                             'clicks');
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top