schew13
schew13

Reputation: 11

How to force Powermail validation before Submit

I'm currently working on a payment solution using the Typo3-Extension "Powermail". I already added a checkout flow via PayPal. The problem is that you can access this even if the form is not validatet.

Is there a possibility to call the validator or force validation before a submit-button is clicked? (best via javascript) And then ask for the return value (prop. a boolean "true" but I'm not sure) beforer starting the checkout.. I found this online, but I'm not sure how it works or how to call.

*****powermail_validator.data('validator').checkValidity()*****

Thanks in advance!

Upvotes: 0

Views: 1188

Answers (1)

Alex Kellner
Alex Kellner

Reputation: 1299

Everything what comes before submit must be done via JavaScript. And everything that is made with JavaScript isn't secure - especially if you want to add a payment solution. If you aware of it and still want to make a validation before submit, see the manual how to extend powermail with a JS validator: https://docs.typo3.org/typo3cms/extensions/powermail/ForDevelopers/WriteOwnValidators/ClientsideValidation/Index.html Nevertheless: Powermail is just a contactform extension for TYPO3 and not a cart process payment extension. I would think about an individual extension for your needs.

Upvotes: 1

Related Questions