⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

[SOLVED] Using set_relation with callback_column problem



HumbleMonk

HumbleMonk
  • profile picture
  • Member

Posted 22 April 2012 - 07:15 AM

One of my table columns is a relation with another table so I used set_relation. It worked quite nicely, showing the fields from the other table that I wanted to show and presenting a dropdown in the add/edit views.

However, I realized that I need to give cells of that column a special class (so that I can perform some javascript on hover). To do this I can use callback_column easily. But I can't use callback_column and set_relation together - set_relation overrides callback_column.

As far as the basic table goes this isn't a huge deal - I can replicate the set_relation effect by just doing my own db->get_where. But what I am really missing out on is the dropdown list in the add/edit views that set_relation creates.

So, is there any way to keep set_relation for add/edit and do my own custom callback for the main table? Alternatively, is there any way to apply a class/id to a table cell while using set_relation?

web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 22 April 2012 - 09:20 AM

Yes this is a known bug and sorry that I didn't have it into known issues. I will add it just now to be a reminder so I fix this for the next version .

Well good news, you can find a workaround for this at: /topic/254-set-relation-breaks-processing-of-field-with-same-name-returned/page__view__findpost__p__982

HumbleMonk

HumbleMonk
  • profile picture
  • Member

Posted 22 April 2012 - 15:06 PM

Wow, that actually worked!

I won't pretend to have a clue what it's doing but I'm just happy that it's working now :D

vladbutterfly

vladbutterfly
  • profile picture
  • Member

Posted 28 April 2013 - 10:07 AM

Hi HumbleMonk

Could you please post the solution of your issue ???

I have the same prob and Im really begginer

I really need to have a small idea about this function

Thanks


goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 18 May 2013 - 03:20 AM

I think the solution has already mentioned: /topic/254-set-relation-breaks-processing-of-field-with-same-name-returned/#entry982