[TYPO3-english] How to hook TYPO3 Form submit

Jan Bednarik info at bednarik.org
Mon Oct 30 23:06:06 CET 2017


Hi,

I believe that no pre or post submit hooks won't help you here. You will 
need some Javascript here. You will have to send request with the 
partial data via AJAX, server will then use cUrl to POST to the remote 
server and return result and based on the result you will then submit 
the form or not. So, you need an eId script to process the AJAX request.

Jan


Dne 25.10.2017 v 9:08 Chris Taylor napsal(a):
> Hello, your support for a new typo3 developer would be greatly appreciated.
> 
> I need to hook into a TYPO3 form submit event and my question is: do I 
> need to write a TYPO3 Extension to achieve this?
> 
> Background:
> -----------------
> I installed TYPO3 version 7.6.23. During the install process I picked 
> the default 'distribution' and I now have the "TYPO3 CMS bootstrap 
> package". When I go to the Installed Extensions screen I have the Form 
> Extension installed (key=form).
> 
> I have a page with a form on it and I need to hook into that form submit 
> event and do a HTTP POST to another site with some of the form data. 
> Optionally I would like to prevent the form submit from happening, 
> depending on the return value of my POST to the other site - so perhaps 
> what I need in-fact is a 'before submit' event to hook.
> 
> Do I need to write an extension to achieve this? If so how can I get 
> started? There are extension tutorials on typo3.org but they imply I 
> need to build a full blown MVC extension, which seems way over the top 
> for my requirements.
> 
> Thank you,
> 
> Chris



More information about the TYPO3-english mailing list