Home › Forums › Quform WordPress › How to display HTML fields in Edit Entry mode
- This topic has 4 replies, 2 voices, and was last updated 6 years, 8 months ago by
Ally.
- AuthorPosts
- August 12, 2018 at 5:01 am #26634
katw
ParticipantI have a number of HTML fields acting as visual dividers between form sections.
Edit Entry mode does not display them.
Is there a way to make them visible in Edit mode?
August 13, 2018 at 8:43 am #26647katw
ParticipantHi Ally,
I have found a solution that works. But that involved copying the following code from
entries/view.php
toentries/edit.php
.if ($element instanceof Quform_Element_Html) { if ($element->config('showInEntry')) { echo sprintf('<tr class="qfb-entry-row-html"><td colspan="2">%s</td></tr>', $element->getContent()); } continue; }
I inserted it after LINE 30 which is:
<?php foreach ($form->getRecursiveIterator() as $element) : ?>
Not a pretty hack but seemed to solve my immediate needs.
BTW both the Entry View and Edit View is inserting
colspan="2"
for Group and HTML elements when your current table layout is only ever one column wide.August 16, 2018 at 3:27 pm #26700Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 16, 2018 at 11:17 pm #26707katw
ParticipantYes I can see a use case for HTML and without HTML fields.
In my case I was using the HTML fields for delimiters/dividers between form sections therefore it made sense to have them in admin mode.
I suppose it would be hard to write a hook to allow you to insert html between field elements in admin view/edit mode?
With say a
after element_ID
parameter. Much like CSS:Before
and:After
.August 20, 2018 at 12:12 pm #26747Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.