Simple Module: display_field & edit_method

edited March 2014 in Modules
Hi

I need to help with setting up my entry in MY_fuel_modules.

All is fundamentally working except that in the "fuel_main_top_panel" of my form view (and the "select another" dropdown), I get the name of the module followed by ">" and then the contents of the first field in the record.

I'm aware that I can set the display_field in MY_fuel_modules to show the desired field but in my case this is complicated by the fact that the field I want to show is in the result of a JOIN.

I've tried using "edit_method" and can successfully create my own function to return the desired result set (which includes the JOIN). However, if I set "display_field" to a JOINed field, I get a database error:
Unknown column 'myName' in 'field list' SELECT myID, myName FROM (`my_information`) ORDER BY `myName` asc Filename: /var/www/fuel/modules/fuel/core/MY_Model.php Line Number: 1122"

It seems there's an additional query in the code that displays a form view?

Anyone with a suggestion of where I can look to fix this?

Cheers

Comments

  • edited 12:01AM
    The model has a "get_others" method that it uses. You can try overwriting that method on your model to return a key value array that is used for that dropdown.
Sign In or Register to comment.