PHP event triggering on forms

Are all the listed trigger events in Process script field for PHP form plugins always triggered or are some/all of them conditionally triggered based on context (e.g. onBeforeCalculations)?

I have several PHP plugins and in some cases I want to make sure some plugins are executed before others. So I normally use the onBeforeProcess because some plugins may manipulate the form content before it is saved. Using onAfterProcess would seem good, but the form data is no longer available there. So I want to use something between these two such as onBeforeStore or onBeforeCalculations. But onBeforeStore mentions "After any images have been uploaded" and I'm not uploading images nor am I doing any calculations. I just want to know if those events are still triggered in every case.
 
Trigger descriptions like "after any fileuploads have been dealt with" (as per Wiki) for onBeforeStore are certainly supposed to explain in a more detailed way when exactly it happens. I have not missed it working without a fileupload element, or such element present but empty. So, no dependencies there.
Also, if you completely distrust this but are not willing to test it yourself, you could put multiple of your code blocks into one and the same plugin and that way have total control over what happens when by having your code lines in the order you want, of course.

[EDIT:]
BTW, who says form data isn't available onAfterProcess anymore? Best carefully read the Wiki as linked to above, there's plenty in the code examples on that page.
 
Last edited:
Apologies. I am aware form data is available onAfterProcess. So what I should have mentioned is that I was wanting to update form data in a plugin before the form is saved. So, per the Wiki when using onAfterProcess, I didn't want to write directly if I didn't have to.

I have decided to consolidate code into a more monolithic construct by loading code blocks. This way I can, as mentioned, have total control of what happens when. Just wish I had started that way sooner. Thanks for the response.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top