I develop a lot of sites which are handed over to clients for maintenance, and would like to make certain Template Variables required so that these clients do not miss an essential element. Being able to make a TV required would be a GODSEND. Does anyone know if this is possible?
-
☆ A M B ☆
- 721 Posts
Under the Input Options tab for any template variable change "Allow Blank" to No.
Did I seriously miss something THAT simple? I love finding new features. Thanks RX2.
I knew it wasn't going to be this simple - on review, I guess more detail is needed. For some reason, MODX won't allow you to use an input type of "image" and also set it to required. That is the functionality that I am specifically after.
-
☆ A M B ☆
- 721 Posts
Yes, that doesn't appear to exist so you'd have to get a programmer to do it or make a feature request. In our case we always use a substitute image if the user fails to select one because they usually see the forgot once they see the public side of a site's results.
I think it doesn't work with date input type too.
Use plugin which will fire on docBeforeSave (or something like that) and check what ever you need...
Antonio Zdilar
linearvector.com