Dragged a new field into List Columns, now it can’t get value
-
I have a custom template that I have been using and it was working fine. Everything was working fine with previous versions of the plugin. I have updated the PDB plugin to the latest versions and still working fine. Below is what was working for Link field:
if ( $this->field->name == 'my_url' ) { $myURL = $this->field->get_value('my_url'); } echo "$myURL"
This all worked fine. I want to add a new field (checkbox).
I went into the backend and added a new field (checkbox) type field. I then went into the Manage List Columns area, and the interface is different. I dragged my new field into the List Columns area at the end because I want to be able to access it via code. I could not see anywhere to “save” so I assumed is just saves automatically.
Now, the last 2 fields in the List Columns (link and checkbox) now don’t work via code:
if ( $this->field->name == 'my_url' ) { $myURL = $this->field->get_value('my_url'); } echo "$myURL" if ( $this->field->name() == 'my_checkbox' ) { $myCheckbox = $this->field->get_value_display('my_checkbox'); } echo "$myURL $myCheckbox"
I’m assuming that there is something in the PDB interface that I did wrong, but with the new interface I can’t figure it out. The old interface had a “display_column” check box that would let my code access it.
Any help would be appreciated!
- The topic ‘Dragged a new field into List Columns, now it can’t get value’ is closed to new replies.