We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Which hooks to use to edit field data prior to saving?

Development and Programming

Ian Beck's avatar
Ian Beck
76 posts
16 years ago
Ian Beck's avatar Ian Beck

Hey there,

I need to do some parsing on a custom entry field whenever the entry is saved and before the entry is edited (so I parse the field and add some stuff when the entry is created, remove it when the entry is opened to be edited, then reparse it when the entry is updated). Basically, the user doesn’t need to see the results of parsing the field, but I need to save it to the database.

My problem is I’m new to extension development so I don’t know which of the loads of hooks I need to tie into. Best I can tell:

  • submit_new_entry_end is what I need to tie into the parse the data the first time (when the entry is created)
  • publish_form_entry_data is what I need to tie into to remove the modifications 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. Help?

Thanks!

(Background info: I need to paginate articles based on paragraph count, and the best way I can think to do this is add the {pagebreak} tag via PHP when the article is saved, then run it through the Simple Pagination plugin. However, client requires that the pagination be totally automatic – they don’t want to see {pagebreak} in the text when editing – so I need to remove it and reparse the text whenever the entry is edited.)

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.