PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Feature Request: filter to change the usage of ul/li

  1. Hi guys, first off congrats with an awesome product! :)

    Here's my feature request:

    I'm currently implementing a design which gets broken because of the way GravityForms output the form. The "gform_field_content" field content is great, and I was able to do what I needed with it - however when GravityForm outputs what it gets from there inside a list it would break the layout (my form is a combination of a one and a two column layout based on the width of the fields).

    So, it would be great to be able to modify the ul/li template.

    Right now I have fixed this with a core hack on line 611 in form_display.php where I change the ul to a div tag. Also inside the get_field() function on line 1713 aprox, I'm just retuning get_field_content() without wrapping it inside an li tag.

    Posted 13 years ago on Wednesday November 9, 2011 | Permalink
  2. Jay
    Member

    Thanks bjorn. This helped to fix some layout issues, however I found it breaks the admin. Using the following. I modified line ~1713 to the following to correct the admin issue. Its not pretty, but it works. It would be really nice if we had the option to use divs, spans, or list elements on a per item basis.
    note: Removing the < li > element breaks conditional logic

    if (IS_ADMIN):
    return "<div id='$field_id' class='$css_class' $style>" .self::get_field_content($field, $value, $force_frontend_label, $form == null ? 0 : $form["id"]). "</div>";
    else:
    return self::get_field_content($field, $value, $force_frontend_label, $form == null ? 0 : $form["id"]);
    endif;

    Posted 13 years ago on Sunday November 13, 2011 | Permalink