Hey All
Kind of new to modx but I was wondering how you change the error message in an eform snippet to display in a bulleted list. I found a similar posting to this however it didn’t tell me exactly where to go look. I have set all of my parameters to required so they do have the value 1. It works on my english site but not on my french site.
Can someone help or point me in the right direction?
Thanks
Riz
-
☆ A M B ☆
- 24,524 Posts
The error message is generated at line 291. The messages are just dumped into the ef_wrapper placeholder without any formatting, and that placeholder is inserted into the $_lang["ef_validation_message"] output, which in turn is loaded into the validationmessage placeholder. The only way I can see how you could do anything with it is to not use the [+validationmessage+] placeholder in your form chunk tpl, and have a snippet to manipulate the $modx->placeholders[’validationmessage’] array item yourself.
but the weird thing is, is that it works fine on the english page and it’s the exact code. i may try duplicating the site again.
Also, do you know what 2 colons in this line mean and what they’re main purpose is?
<input type="text" name="firstName" eform="firstName::String::0" />
I know it works with just one colon after the datatype however, is the second colon necessary.
Thanks
Riz
-
☆ A M B ☆
- 24,524 Posts
No. The only time two colons are necessary is to indicate a part deliberately left empty, like Your Name::1 would be sufficient for a text-type input that is required. The :: indicates that the second field, the "type", is left blank, and the "required" field is 1. It’s like having two commas in a function call argument list to indicate that argument is left empty.
thanks for your help. i really appreciate it. would you be able to tell me or show me or point me to how i could modify the validation message. As I said before, I’m a newbie to modx so I wouldn’t even know where to begin.
Thanks