views:

203

answers:

1

Not having much luck with this query in the ExpressionEngine forums and it's time-sensitive, so I figured I'd see if there's any EE-junkies hanging around Stack Overflow.

I'm working on an EE extension and I need to know what hooks to use to parse a custom field's contents when it's first saved, parse it before being displayed to be edited, and parse it when the edited contents are saved once more. My problem is I'm new to EE extension development, and I'm having trouble figuring out which in the long list of hooks I need to use. Best I can tell:

  • submit_new_entry_end is what I need to tie into when the entry is first created
  • publish_form_entry_data is what I need to tie into for parsing before the user edits the entry

And I must be overlooking the hook that will let me edit the entry data before it is saved back to the database. Anyone have some advice?

Thanks!

A: 

With trial and error, I finally answered my own question. The hooks that you want in order to parse a custom field's contents on save and reparse them before the entry is displayed are:

  • submit_new_entry_start (called whenever an entry is submitted; "new" appears to be meaningless)
  • publish_form_entry_data (I had this one right)
One Crayon