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

CSS Changes in form_X.js

Discussion in 'Community' started by digitalDave, Sep 16, 2019.

  1. digitalDave

    digitalDave New Member

    Level: Community
    I'm new to Fabrik, I'm wondering if its possible using form Javascript to change elements made visibility: hidden in the custom CSS file to visible?

    I hope its easy.
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Sure, just straight up JavaScript / JQuery ...

    jQuery('#your-selector').css('visibility', 'visible');

    Replace #your-selector with the selector for whatever DOM element you want to work on.

    -- hugh
     
    digitalDave likes this.
  3. digitalDave

    digitalDave New Member

    Level: Community
    Thanks Hugh

    That was exactly what I was looking for.
     
  4. digitalDave

    digitalDave New Member

    Level: Community
    Just one more question, how do I show the label for the element?
     
  5. troester

    troester Well-Known Member Staff Member

    Level: Community
    Don't select only the element but the element container.
    Or do it for both, label and element.
     
    digitalDave likes this.
  6. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Yes, just to be clear, by "DOM element" I mean the DOM element (not Fabrik "element") you want to affect, like the Fabrik element wrapper div.

    -- hugh
     
    digitalDave likes this.
  7. digitalDave

    digitalDave New Member

    Level: Community
    Thank you Hugh
    That helped me, You guessed right that I was getting mixed up.
     
  8. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Yup. It's perhaps unfortunate that 15 years ago when Fabrik first started (as Mambo Forms) we chose "element" as the terminology, as it does tend to lead to confusion with "DOM element".

    https://www.w3schools.com/jsref/dom_obj_all.asp

    -- hugh
     

Share This Page