Has anyone run into this before? In one of our modules we need to allow the end user to be able to set a particular class to any string they like. However, when the end user passes the string: “on” as the parameter, it appears that EE is switching it to “yes”. Has anyone run into this before? Is there a way to work around it?
It is by design. Look at the function’s source in the Template library. Specifically the docblock comment:
* Used by Modules to fetch a paramter for the tag currently be processed. We also have code * in here to convert legacy values like ‘y’ and ‘on’ to their more respectable full values. * Further, if one assigns the second argument, it will be returned as the value if a * parameter of the $which name does not exist for this tag. Handy for default values!
-greg
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.