Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Just something weird I can not get my head around. I have the editable in the php file, and content filled in "SECTIE 2: ALLE MEDEWERKERS (SUBDOELEN 2.1, 2.2, 2.3)" in the Admin, but I did not place <cms:show sectie /> anywhere, yet it pops up at the very beginning of the html source.
I have deleted and reinstalled the database, did not help my problem.

The php source code on server:
Code: Select all
<?php require_once( 'survey/cms.php' ); ?>
<cms:template title='... ONLINE SURVEY' />
    <cms:editable type='text' name='sectie' label='Sectie' desc='Titel van de sectie' validator='regex=/[a-z0-9\.]+/' />

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
   <title>... | ONLINE SURVEY</title>
   <meta name=”robots” content=”noindex”>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width">

</head>

<body>
</body>
</html>

<?php COUCH::invoke(); ?>


The generated html:
Code: Select all
    SECTIE 2: ALLE MEDEWERKERS (SUBDOELEN 2.1, 2.2, 2.3)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
   <title>... | ONLINE SURVEY</title>
   <meta name=”robots” content=”noindex”>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width">

</head>

<body>

                    <div style="clear:both; text-align: center; z-index:99999 !important; display:block !important; visibility:visible !important;">
                        <div style="position:relative; top:0; margin-right:auto;margin-left:auto; z-index:99999; display:block !important; visibility:visible !important;">
                        <center><a href="https://www.couchcms.com/" title="CouchCMS - Simple Open-Source Content Management" style="display:block !important; visibility:visible !important;">Powered by CouchCMS</a></center><br />
                        </div>
                    </div>
                    </body>
</html>


<!-- Page generated by CouchCMS - Simple Open-Source Content Management -->


The page generated:
SECTIE 2: ALLE MEDEWERKERS (SUBDOELEN 2.1, 2.2, 2.3)
Powered by CouchCMS
Hi,

The problem lies here -
Code: Select all
<cms:template title='... ONLINE SURVEY' />

If you take a look at it closely, you'll find that you have closed it.
This makes the <cms:editable> statement that follows it, fall effectively outside it at the top of the page.

Please make it as follows -
Code: Select all
<cms:template title='... ONLINE SURVEY'>
    <cms:editable type='text' name='sectie' label='Sectie' desc='Titel van de sectie' validator='regex=/[a-z0-9\.]+/' />
</cms:template>

Notice how we are now using a closing statement with <cms:template> and enclosing the <cms:editable> within it.

Hope this helps.
Thanks so much! Oepsie! :roll:
3 posts Page 1 of 1