0

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?

1 Answer 1

0

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

ee()->api_channel_entries->data['field_id_X'] = 'Foo';
3
  • 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
    Commented Jun 12, 2015 at 20:26
  • I think so, but you'll have to experiment. Couldn't tell you without looking at the source. Commented Jun 15, 2015 at 14:51
  • I used datagrab and it worked perfectly
    – zizther
    Commented Jun 15, 2015 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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