1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Add a details/form cell class via jscript

Discussion in 'Community' started by jh, Mar 16, 2019.

  1. jh

    jh Member

    Level: Community
    Hi

    I wanted to style some cells in details/form view by using the element data as a cell class. Similar to list view by selecting 'use as a row class', but for details view.

    I think this can be done by a jscript file along the lines of:

    function myFunction() {
    var element = document.getElementById("factory_table___factory_name");
    element.classList.add("mystyle");
    }

    where "mystyle" will be the element value instead.

    However I can not get this to work when testing (firebug does not show the value "mystyle" in testing).

    I have the jscript file working on the details template for another script so I think it is basically set up right but I can not get this to work.

    Many thanks
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
  3. jh

    jh Member

    Level: Community
    Great, thank you. Will be very useful.
     

Share This Page