Add optional field "ID" to forms which will render a CSS ID on the front end which can then be styled

If you could add an ID to a view which then encapsulated the view (form, table etc) on the front end within it’s own CSS class, it would make it possible to style it.

Add ability to assign these to different user roles so each user role could have a different style too.

Hi @GSH,

Views are selectable by id. For example

#view_123 {
  /*  CSS styles for view_123 */
}

If your goal is for each user role to have a different style, you can save those styles as CSS classes, then apply them to the views accessible by that role. For example:

/* CSS */
.role_1 {
  /* Insert CSS styles for role_1 */
}
.role_2 {
  /* Insert CSS styles for role_2 */
}

// Javascript.
// This code will run on all views.
$(document).on('knack-view-render.any', function(event, view, data) {
  // 1. Get roles who can access this view.
  // 2. Add CSS class for each role to the view.
})

Hope this helps.

-Ian

Thank you for that explanation.