Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi,
I had a field which I created through the
Code: Select all
<cms:config_form_view>

Bildschirmfoto 2024-09-11 um 15.54.00.png
Bildschirmfoto 2024-09-11 um 15.54.00.png (68.49 KiB) Viewed 5172 times

Code: Select all
<cms:config_form_view>
        <cms:field 'Wichtige Information' order='1'>
            <div class="alert alert-danger" role="alert">Bitte immer eine Uhrzeit angeben!<br>Sonst wird diese automatisch mit 00:00 Uhr ausgefüllt.</div>
        </cms:field>
        <cms:style>
            #admin_wrapper_custom_fields .alert-danger{
            color: #004085;
            background-color: #cce5ff;
            border-color: #b8daff;
            }
        </cms:style>
    </cms:config_form_view>


Now I moved it to another template but on the original I don't get it deleted.
I have tried also to disable all fields width
Code: Select all
<cms:ignore>
but it killed only my needed fields.
So how get this field deleted?

Best
Try use just an empty self-closed tag.

Code: Select all
<cms:config_form_view />

The idea of this solution is that old values are persisted in db, thus need to become overwritten to make configuration disappear (i.e. output nothing). When Couch does not see the tag (after removal of tag from the template) it does not delete the old content. Using empty tag overwrites previous config with empty value.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Hello @trendoman,
thanks it works like a charme.

Best
3 posts Page 1 of 1