ridwanskaterock / cicool

Cicool is a multifunctional application that is used to facilitate your work in creating a system, CMS, E-Comerce and others
20 stars 13 forks source link

Problem with select fields #175

Closed ghost closed 5 years ago

ghost commented 6 years ago

Hello...

Im facing some issues with a select field who is a lookup-select in another table. Table 1 is city with id, city and state_id fields. Table 2 is state with id, and state fields.

First problem is when showing data from cities, it's not displaying the state name because find method uses id field on city, instead of state_id (looks like it's taking the primary key field). I have "solved" this issue creating a find1 method who uses the correct field and then the state name shows ok in cities_list view.

Second problem it's when trying to update a city, when Save button it's clicked, there is a panel with error 'data has not changed', and nothing it's saved. The same for the Save and back to list button.

Site it's online and I can give you credentials to check it, just tell me how to make contact with you please...

By the way, your product it's just great !!!

Kind Regards

Sergio

ridwanskaterock commented 6 years ago

Hii.

for

Thanks for it

ghost commented 6 years ago

Hello,

Thanks for your answer...

1- I'm attaching a screen capture from field configuration: Id is primary key on state (estado) table, estado is description field (the label needed). Also, on youtube video this select fields are using input style (char) and use the same field for both options -value and label). I'm using id int field and estado char type... Is this ok ?

2- Where should I put this code ? at view, model or controller ?

Thanks !

El lun., 21 may. 2018 a las 1:16, Muhamad Ridwan (notifications@github.com) escribió:

Hii.

for

  • problem 1 if you choose select for field make sure, value field reff select to your primary key and label field reff select to field showing for label
  • for problem 2 can you write some code after save dd($this->db->error()); and you can see error problem

Thanks for it

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ridwanskaterock/cicool/issues/175#issuecomment-390563198, or mute the thread https://github.com/notifications/unsubscribe-auth/ALjAtv8mlk482qYHxm_dq0A3Uij3h58Cks5t0luvgaJpZM4UGWm2 .

-- Con mis mejores deseos...

Sergio Alejandro Ruiz

ridwanskaterock commented 6 years ago
  1. yes for first version cant't support join table, but on version 2 we improvement about select field and make it to joinable, good way you can change foregin field to integer

  2. you can place code on model example image

Thanks

ghost commented 6 years ago

Hello again...

Now it's working, the problem was caused for using fields named 'id' in all the tables, I renamed them accordingly and now all's just fine...

However, I have some other problem: I need to change the pagination buttons text, as they are in english (next, prev, last, first) and I need them on spanish, but I can't find where to change it... I have tried changing it by code at the controller ($config['first_link'] = 'Primero';), but no luck... Any clue ?

Thanks again !

El lun., 21 may. 2018 a las 10:35, Muhamad Ridwan (notifications@github.com) escribió:

1.

yes for first version cant't support join table, but on version 2 we improvement about select field and make it to joinable, good way you can change foregin field to integer 2.

you can place code on model example [image: image] https://user-images.githubusercontent.com/9270445/40315893-e19843be-5d46-11e8-86b6-a86181b3f4ec.png

Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ridwanskaterock/cicool/issues/175#issuecomment-390691360, or mute the thread https://github.com/notifications/unsubscribe-auth/ALjAtp_eyueRH9u18FynZGTLYaQXI-Ntks5t0t7LgaJpZM4UGWm2 .

-- Con mis mejores deseos...

Sergio Alejandro Ruiz

ridwanskaterock commented 6 years ago

Hi for that you can change it on application/core/My_Controller.php image

nice, thanks i will add this config on lang for next version

ghost commented 6 years ago

Ok, paginations links is solved...

How to change a label-type menu item ??? Delete and edit buttons does not seem to work for labels, just for menu type items...

Sergio

El mar., 22 may. 2018 a las 1:10, Muhamad Ridwan (notifications@github.com) escribió:

Hi for that you can change it on application/core/My_Controller.php [image: image] https://user-images.githubusercontent.com/9270445/40344969-5d6abe5c-5dc1-11e8-891b-e1324994001a.png

nice, thanks i will add this config on lang for next version

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ridwanskaterock/cicool/issues/175#issuecomment-390874121, or mute the thread https://github.com/notifications/unsubscribe-auth/ALjAtsVUHrtY2giFI83dJ5gxcWhFqYhaks5t06u-gaJpZM4UGWm2 .

-- Con mis mejores deseos...

Sergio Alejandro Ruiz