Custom block problem
Permalink
Hello,
I have recently started developing own blocks. I have achieved to get it working, but for somehow some fields are not being inserted into my database.
This is the code of my block
And this is the layout of my db.xml
For somehow, ondertitel and sound are not being inserted. Can anyone help me debugging?
I have recently started developing own blocks. I have achieved to get it working, but for somehow some fields are not being inserted into my database.
This is the code of my block
<?php defined('C5_EXECUTE') or die(_("Access Denied.")) ?> <div class="ccm-ui"> <div class="alert-message block-message info"> <?php echo t("Voeg een product toe.") ?> </div> <?php echo $form->label('titel', t('Titel')) ?> <?php echo $form->text('titel', $title) ?> <?php echo $form->label('sound', t('Uitspraak')) ?> <?php echo $form->text('sound', $sound) ?> <?php echo $form->label('ondertitel', t('Ondertitel')) ?> <?php echo $form->text('ondertitel', $ondertitel) ?> <?php echo $form->label('omschrijving', t('Omschrijving')) ?> <?php echo $form->textarea('omschrijving', $omschrijving) ?> <?php echo $form->label('prijs', t('Prijs')) ?> <?php echo $form->text('prijs', $prijs) ?>
Viewing 15 lines of 20 lines. View entire code block.
And this is the layout of my db.xml
<?xml version="1.0"?> <schema version="0.3"> <table name="btBasicTest"> <field name="bID" type="I"> <key ></key> <unsigned ></unsigned> </field> <field name="omschrijving" type="X2"> <default value="" ></default> </field> <field name="titel" type="C" size="255"> </field> <field name="prijs" type="X2"> <default value="" ></default> </field>
Viewing 15 lines of 24 lines. View entire code block.
For somehow, ondertitel and sound are not being inserted. Can anyone help me debugging?
GO to "Block types" on your dashboard. Click your block. Then click "Refresh". This will reset your database fields.
Let me know if that does the trick.