<p>I am looking to create a plugin which will update a field in a section when I save an entry.</p>

<p>I will be getting the length of an MP3 file (using FFMPEG) I upload via assets and output the time to another input.</p>

<p>I can listen out for the <code>onSaveEntry</code> event, but I am unfamiliar with getting and putting data in a craft plugin.</p>

<p>Any help would be appreciated.</p>

CC BY-SA 3.0
2015-10-21T15:59:02.940Z
This is a pretty broad question... have you had a go through the plugin docs? http://buildwithcraft.com/docs/plugins/introduction I feel like between that and existing questions/answers here on Stack Exchange you'll find all the answers to get you there.
Brad Bell
CC BY-SA 3.0
2015-10-21T19:18:04.880Z
Thanks Brad. If there is a plugin which does something similar I can work with that. All I need to know is how to get the field data from a section when I save an entry and then add that data to a field before the save. I will take a look at and see if I can find the answer. I did take a look before
zizther
<plugin-development><field><sections>
How to create a plugin which will update a field in a section when an entry is saved
# How to create a plugin which will update a field in a section when an entry is saved

(Asked by: username_0 on 2015-10-21)

I am looking to create a plugin which will update a field in a section when I save an entry.

I will be getting the length of an MP3 file (using FFMPEG) I upload via assets and output the time to another input.

I can listen out for the `onSaveEntry` event, but I am unfamiliar with getting and putting data in a craft plugin.

Any help would be appreciated.

**Tags:** plugin-development, field, sections

> **Comments:**
> **username_1**: This is a pretty broad question... have you had a go through the plugin docs? http://buildwithcraft.com/docs/plugins/introduction I feel like between that and existing questions/answers here on Stack Exchange you'll find all the answers to get you there.  
> **username_0**: Thanks Brad. If there is a plugin which does something similar I can work with that. All I need to know is how to get the field data from a section when I save an entry and then add that data to a field before the save. I will take a look at and see if I can find the answer. I did take a look before  

---

## 0 answers

