Support #31095
Accessing intercepted values in Conditions
| Status: | Resolved | Start date: | 2011-10-19 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Reinhard Führicht | % Done: | 100% |
|
| Category: | - | |||
| Target version: | Stable v1.0 | |||
| Votes: | 0 |
Description
In my interceptor I add some calculated values to gp. It seems that conditions are handled before interceptors, so I can’t used these complex values for conditions. Is there a way to create custom conditions (PHP)?
Associated revisions
Parse conditions again after the interceptors were called (fixes #31095)
Parse conditions again after the interceptors were called (fixes #31095)
Follow-Up-Patch: Accessing intercepted values in Conditions (fixes #31095)
Follow-Up-Patch: Accessing intercepted values in Conditions (fixes #31095)
History
Updated by Reinhard Führicht over 1 year ago
- File 31095.patch added
- Status changed from New to Accepted
- Assignee set to Reinhard Führicht
- Target version set to Stable v1.0
Could you please test the attached patch? It changes the controller to parse the conditions again after the interceptors have been called.
Updated by Rainer Becker over 1 year ago
This works and is a great help for the application I am building. Thank you for your support!
Update: In the second/new condition check I change the validators. The required-marks appear accordingly but I can submit this step without filling the required fields.
Updated by Reinhard Führicht over 1 year ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r53193.
Updated by Rainer Becker over 1 year ago
Just want to be sure that you’ve read my last annotation - the validation added within the second condition check doesn’t work.
Updated by Reinhard Führicht over 1 year ago
- Status changed from Resolved to Accepted
It seems I didn't get an email notifying me about your comment.
I will investigate the problem you describe.
Updated by Reinhard Führicht over 1 year ago
- File 31095_v2.patch added
- Status changed from Accepted to Needs Feedback
- % Done changed from 100 to 80
I was able to reproduce what you describe.
Please test the attached additional patch.
The patch makes sure that after the conditions were parsed, the settings are merged with the step specific settings again.
Updated by Reinhard Führicht over 1 year ago
Any news on this?
Updated by Rainer Becker over 1 year ago
The changed validations are now handled correctly - thanks a lot!!
Updated by Reinhard Führicht over 1 year ago
- Status changed from Needs Feedback to Resolved
- % Done changed from 80 to 100
Applied in changeset r53507.
Updated by Reinhard Führicht over 1 year ago
Just out of curiosity, may I ask what your application does?
It sounds interesting that you wrote interceptors to "calculate" values.
Updated by Rainer Becker over 1 year ago
- some product records containing name and different prices
- some TS constants (for base prices and links)
- three form templates
- roundabout 1400 lines of TS setup for multiple form steps and dynamic validation
- one php interceptor class for each form type to calculate submitted values and save them to gp-array
- master template with every input field type and output field for html and plaintext
- a template file for field combos (input and output) like personal data which are the same in all forms
- and - the best - an highly reactive extension developer - that’s you :-)
Updated by Reinhard Führicht over 1 year ago
Wow, that sounds like a lot of work! Thanks for the explanation.
I think, I never built such a complex form myself using Formhandler.
I am very happy that this worked without any mayor problems. It seems that I did at least some things right when thinking about the extension's architecture. :-)
Updated by Reinhard Führicht over 1 year ago
Another question came up, sorry for nagging. :-)
We are currently preparing a website dedicated to Formhandler and its documentation and we would like to gather and present some user feedback on the website. Would it be OK for you, if we published this information on the website? (The domain is typo3-formhandler.com and it should be online within the next week)
Updated by Rainer Becker over 1 year ago
You’re welcome!
Updated by Reinhard Führicht over 1 year ago
Thanks!