Panels

From pmusers
Jump to: navigation, search

Panels have their own spacing and formatting issues. The border property of a panel can be set to 0px, which mostly eliminates the border, but there is a still a faint grey line underneath the panel. The easiest solution to use JavaScript instead of a panel to insert a block of HTML code into a Dynaform.

For example, to insert a green horizontal rule <hr>, the following JavaScript can be added to the Dynaform:

$("#fieldID").closest("div.row").after('<hr style="background-color:green; height:1px; width:90%; margin-top:0px">');

Where fieldID is the ID of a field after which the <hr> will be inserted. jQuery's .after() function is used to insert the HTML code after the div holding a row in the Dynaform. The .before() function can be used to insert before a field's row.