Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document conversion of argument (camel case or underscore) to attribute (dash) #277

Closed
perdjurner opened this issue Jul 17, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@perdjurner
Copy link
Contributor

http://cfwheels.org/docs/1-1/chapter/form-helpers-and-showing-errors
Text (add in the "Passing Extra Arguments for HTML Attributes" section):

Since ColdFusion cannot have any dashes in argument names we have constructed a work around for you. Let's say you want a "data-dom-cache" HTML attribute, then all you have to do is pass in "data_dom_cache" and Wheels will convert that to "data-dom-cache" in the HTML output for you.

You can also pass in the (perhaps a little prettier) "dataDomCache" instead but then you need to update the global "dataAttributeDelimiter" setting first like this:

set(dataAttributeDelimiter="A-Z")

@perdjurner perdjurner added this to the 1.3.0 milestone Jul 17, 2014
@perdjurner perdjurner self-assigned this Jul 17, 2014
@chrisdpeters
Copy link
Contributor

Committed. Also added a section about HTML boolean attributes while I was in there. Let me know what you think...

@perdjurner
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants