I am working on an add-on solution where I would like to create a channel entry and set a value to a module custom tab field for that entry.
Here's some code to share what I am up to:
$this->EE->load->library('api');
$this->EE->api->instantiate('channel_entries');
// Build data array
$data = array(
'author_id' => $member_id, // Member ID
'title' => $title,
'entry_date' => $date,
'modl_giving_impact_member_opportunities__opportunity_id_token' => $opportunity_id_token, // Giving Opportunity token
);
// Add new entry into channel
$this->EE->api_channel_entries->submit_new_entry($channel_id, $data);
Here's how I am attempting to target the module field:
modl_giving_impact_member_opportunities__opportunity_id_token
[module class name]__[field name]
Entry is being created but no luck with module field data being stored.
Anyway know how to properly include module data field data in my $data array?