HTML Table not showing when using Side-by-side

Home Forums Classic DFFS HTML Table not showing when using Side-by-side

Viewing 4 reply threads
  • Author
    Posts
    • #35571
      Duncan Martin
      Participant

        Hello Alexander,

        I’m using DFFS 4.4.5.4, and trying to hide an HTML table in a side-by-side section in our rules until a selection is made.
        The rest of our fields hide and show correctly, but the HTML fields don’t show when the rule is triggered.
        When I inspected the page I could see the section was loading, but it wasn’t visible.
        I removed the SBS index from the field and confirmed this was stopping it.

        I’ve hit a bit of a wall with where to go from here, is there a way I can make the section show?

        Thanks

      • #35572
        Duncan Martin
        Participant

          I found it was because the style isn’t being removed for the HTML field, as in the attachment.

          I got around it by removing the style via jQuery in the Custom JS, but I’m sure there’s a better way

          function removeStyle(){
          var sbsTable = document.getElementById(“sbs_Field_dffsHTML_charity_test2_1”);
          var sbsTable1 = document.getElementById(“sbs_Field_dffsHTML_charity_test_1”);
          var sbsTable2 = document.getElementById(“sbs_Field_dffsHTML_charity_test3_1”);
          jQuery(sbsTable1).removeAttr(“style”);
          jQuery(sbsTable2).removeAttr(“style”);
          jQuery(sbsTable).removeAttr(“style”);
          }

        • #35574
          Duncan Martin
          Participant

            better script:
            function removeStyle(){
            var sbsTable = document.querySelectorAll(‘[fieldtype=dffs_html’);
            jQuery(sbsTable).removeAttr(“style”);
            }

          • #35575
            Duncan Martin
            Participant

              Disregard my edit, that broke the tabs.

            • #35613
              Alexander Bautz
              Keymaster

                Hi,
                Sorry for not replying – the email notification on my site broke after an update and I didn’t catch your question.

                How did you try to show / hide the HTML section in your rule?

                If you want it hidden initially you can set up a rule triggering on “The form is initiated” and add the HTML Unique ID to the “Hidden headings or elements” textarea.

                Then, on the rule triggering on your selection, you add the same Unique ID to the “Visible headings or elements” textarea.

                Alexander

            Viewing 4 reply threads
            • You must be logged in to reply to this topic.