Hello!
I want to modify the error messages displayed by FormIt-Snippet. I’ve noticed, that the Output Filters don’t work on them.
[[+fi.error.company]] -> Error message
[[+fi.error.company:ucase]] -> nothing...
Is that an issue or I am using it wrong way?
-
☆ A M B ☆
- 2,475 Posts
Have you tried using the output filter on a normal placeholder, e.g. [[*content:ucase]]? I don’t know how the processing of the Snippet tpls works here, but it’s more complicated for sure.
It works on other placeholders.
[[+fi.error.company:cat=`X`]] -> Just X
[[*rootId:cat=`X`]] -> 5X (rootId and X)
It also works with [[++vars]], but not with placeholders set in a snippet (like FormIt).
I think that FormIt is processing the placeholders itself rather then letting the MODx parser do it, so the output modifier is never applied (unless FormIt has been updated to do this).
FYI, it’s a minor technicality, but I think it’s more correct to call the thing after the ":" an "output modifier". The output filter is the thing that processes all the modifiers.
What is the line of code with the output modifier? You might be able to put the modifier outside of the placeholder tag.
Hi Bob,
Sorry for such late answer, It was solved but unfortunately I don't remember how exactly now, anyway many thanks for your efforts.