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.

True HTML Block - Is there a way?

  1. I need to add some freeform html/text between fields.

    Other than writing a filter to replace/delete unwanted output, is there a way to insert a true HTML block that isn't wrapped?

    So, instead of this:
    <li id="field_3_53" class="gfield gfield_html gfield_html_formatted gfield_no_follows_desc">whatever

    It just outputs this:
    whatever

    Thoughts?

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  2. David Peralty

    Not really. I've seen some people use JavaScript to do replacement on the HTML to strip out things they don't want so that they get closer to the output they need, but beyond that, I don't know of any way to do what you are asking.

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  3. Thanks David for the quick reply. I was thinking of doing it with either jQuery or a filter but was trying to avoid it. :)

    Have you guys ever considered adding a select option to the field to output only what is in the content box? I think this would be beneficial and of interest to many...and it wouldn't be that difficult to implement programmatically.

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  4. David Peralty

    I haven't heard any discussions of that. I think the biggest worry is how that would change styling. Imagine a field being output in a "raw" mode without our wrappers, and then someone tries to use our CSS Ready class to make a bullet list three columns. It isn't going to work, and our troubleshooting would be greatly increased.

    Also, as a per-item option, it would potentially clutter the UI. If you want, I can move this to feature requests though so our development team will take a look.

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  5. I think it'd be of benefit. Of course people can screw anything up so maybe you add a "use at your own risk" next to the checkbox - but it would allow for proper implementation of fieldsets and other things. I come from the cform world and they had a field like this which I found I was using all the time when I needed to "hack" something in. It would be much easier to have this option than to write filters or jQuery code on a case by case basis.

    Thanks again David. ;)

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  6. David Peralty

    Moved to Feature Requests. :)

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  7. Richard Vav
    Administrator

    In the html field could you not close the li and ul elements then enter whatever custom code you want before reopening the ul and li like so

    </li>
    </ul>
    whatever
    <ul class="gform_fields top_label description_below">
        <li>
    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  8. Hi Richard, yes, but that's still a hacky patch way of doing it leaving extra elements which don't really need to exist. ;) I'm a fan of clean. I LOVE Gravity Lots... ;)

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  9. Richard - to follow up on this - it works until you are wrapping a fieldset with conditional logic. As soon as you escape the fieldset with the the conditional logic is thrown out the window.

    So I do think that this type of field could add some real value.

    ;)

    Posted 11 years ago on Friday May 17, 2013 | Permalink

This topic has been resolved and has been closed to new replies.