Custom Class placement
-
Maybe this is ill-placed, but my opinion for custom classes is that they SHOULD be put on the container for the vfb item. The fact that they are on the inputs themselves really limits styling capabilities.
Example:
I have a checkbox form item, with approx 35 checkboxes (It’s basically a category). I would expect the custom class i apply would go on the VFB LI element, so that I could specifically style that class’ label, and input.Because the class is on the input itself, I cannot control the width of the field with an overflow, use background colors (not that I’d want to in this case, but still), etc.
Targeting the element ID is semi sketchy, considering they are instance-related. That means Any time you deleted a field, or added a similar one to another form, you would have to address the new generated id as well (#vfb-item-15).
This isn’t ideal from a development perspective, and really can cause a site to break when transferring a site to another server, if you don’t preserve primary keys (for whatever reason you wouldn’t).
- The topic ‘Custom Class placement’ is closed to new replies.