Juergen Posted November 6, 2017 Share Posted November 6, 2017 Hello @ all, I cannot find a solution for this behavior: I want to validate a field which value is sometimes filled out manually and sometimes via a hook. The custom validation was done with this type of hook: $pages->addHookAfter("InputfieldDatetime::processInput", function($event) { The hook for adding a value in this field is done via this type of hook: $pages->addHookBefore('saveReady', function($event){ The 2 hooks work but the problem is that "processInput" runs before "saveReady" and so I always get the error that the field is empty. But the value will be added correctly if you can see at the following screenshot. If I fill out the value manually everything works. So which type of hook runs before "processinput" and can be used to populate a field with a value. Thanks Link to comment Share on other sites More sharing options...
Juergen Posted November 6, 2017 Author Share Posted November 6, 2017 No need to investigate further. I have disabled the validation if the value will be added via a hook. The validation only take place if the value is entered manually Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now