Great plugin--it helped me solve so many issues. I do have a question though:
In the formulateField directive, your template just outputs the fieldtype for the CSS class. This is fine for some general CSS styling. But for more targeted CSS styling, How about also outputting the field alias too? so instead of just
Once you do that, I can add some details about where to modify the code. Life is a bit busy at the moment, so I can't promise to get to it soon. However, if you submit a pull request, I'll make sure to create a release soon thereafter.
Include field alias in field CSS class?
Hello!
Great plugin--it helped me solve so many issues. I do have a question though:
In the formulateField directive, your template just outputs the fieldtype for the CSS class. This is fine for some general CSS styling. But for more targeted CSS styling, How about also outputting the field alias too? so instead of just
class="formulate__field--text"
It could be something like:
..for a "First Name" text field.
I'm aware there's already a specific field-id attribute outputted, but using that string is not very clean or dependable.
Thanks!
Sounds like a good idea for a feature request. Would you mind submitting it here?: https://github.com/rhythmagency/formulate/issues
Once you do that, I can add some details about where to modify the code. Life is a bit busy at the moment, so I can't promise to get to it soon. However, if you submit a pull request, I'll make sure to create a release soon thereafter.
By the way, I'd stick with this format:
formulate__field-alias--first-name
. I call this snake case (though there may be a more accurate name): https://github.com/rhythmagency/rhythm.core/blob/c87e4b350bde79b43e46b3023a99c51c61456d76/src/Rhythm.Core/StringExtensionMethods.cs#L113Thanks! I appreciate anything you can do when you have the time. I know how busy life can get.
(Also, I've heard it being called kabob-case, which I've always found equally hilarious and intuitive.)
Thanks for creating the issue. And yeah, kebob-case is probably the better term :-)
Here's a link to the issue for reference: https://github.com/rhythmagency/formulate/issues/100
FYI, this has been implemented and will be included in the next release of Formulate. See the issue linked above for details.
is working on a reply...