ryan Posted July 7, 2017 Share Posted July 7, 2017 This week we’ve got ProcessWire version 3.0.66, and this post takes an in-depth look at the new “Functional Fields” ProFields module, just released today… https://processwire.com/blog/posts/functional-fields/ 8 Link to comment Share on other sites More sharing options...
Robin S Posted July 7, 2017 Share Posted July 7, 2017 Functional fields sound awesome! Seeing as both of these may be used as the first argument... __text('Subscribe') // intended to be some default text __text('subscribe') // intended to be the name previously given to some different text ...is it right that you would have to be careful when giving a name to text to make sure it is not a string that might be used as default text, now or in the future? Like, maybe you would want to prefix the name with something that is unlikely to be used as default text. And in the example above, would those two be identified as separate text items - i.e. is the name case-sensitive? 3 Link to comment Share on other sites More sharing options...
cstevensjr Posted July 8, 2017 Share Posted July 8, 2017 Functional Fields looks like it will be a great addition to the ProFields family. Thanks for making this tool available. 1 Link to comment Share on other sites More sharing options...
ryan Posted July 8, 2017 Author Share Posted July 8, 2017 Quote Seeing as both of these may be used as the first argument... I don't think it'll be an issue for this case because the words may be the same, but the case is different. But there's actually another function in the posted version called __value('name'), which is what you can use if you prefer it. It returns whatever bit of text has the given name, regardless of what kind it is. However, it's pretty easy to avoid these kinds of collisions even without the __value() function. 2 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