You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to remove the FieldGroup from a children page which has set title. I could not do that instead I have to remove each fields and then the title. But there was no way to remove the Label/Title. I modified the template FieldGroup_Holder.ss. to show the labels in FieldGroup only when FieldListexists.
<% if $FieldList.count %>
<div <% if $Name %>id="$Name"<% end_if %> class="field <% if $extraClass %>$extraClass<% end_if %>">
<% if $Title %><label class="left">$Title</label><% end_if %>
<div class="middleColumn fieldgroup<% if $Zebra %> fieldgroup-$Zebra<% end_if %>">
<% loop $FieldList %>
<div class="fieldgroup-field $FirstLast $EvenOdd">
$SmallFieldHolder
</div>
<% end_loop %>
</div>
<% if $RightTitle %><label class="right">$RightTitle</label><% end_if %>
<% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
<% if $Description %><span class="description">$Description</span><% end_if %>
</div>
<% end_if %>
And also could there be a option to remove the composite fields at once instead of remove each fields.
The text was updated successfully, but these errors were encountered:
FieldList->removeByName($fieldName, $dataFieldOnly = false) should allow you to remove a FieldGroup. Can you please paste the PHP that doesn't work for you? Are you doing this in getCMSFields()?
I am trying to remove the
FieldGroup
from a children page which has set title. I could not do that instead I have to remove each fields and then the title. But there was no way to remove the Label/Title. I modified the templateFieldGroup_Holder.ss
. to show the labels inFieldGroup
only whenFieldList
exists.And also could there be a option to remove the composite fields at once instead of remove each fields.
The text was updated successfully, but these errors were encountered: