I have created an extension which uses the entry_submission_ready hook. It is doing some calculations which I want to add to a field in the entry.

How can I add the output of the calculations to the field when saving an entry?


You can set your values directly on the API object like so:

ee()->api_channel_entries->data['field_id_X'] = 'Foo';
  • Do you know if this will work when importing entries, does it use the same process as adding a new entry using the hook? – zizther Jun 12 '15 at 20:26
  • I think so, but you'll have to experiment. Couldn't tell you without looking at the source. – Derek Hogue Jun 15 '15 at 14:51
  • I used datagrab and it worked perfectly – zizther Jun 15 '15 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.