Categories
CMS Magento Mastering Development

How to add Custom Registeration field from admin

Hi i have a form in admin and i want that when select the type this values should reflect on an appropriate selected form but am not able to do so can anyone guide me here is a screenshot

InstallSchema.php

<?php
/**
 * @category   Eecom
 * @package    Eecom_CustomCustomerAttribute
 */
namespace Eecom\CustomCustomerAttribute\Setup;
use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
/**
 * @codeCoverageIgnore
 */
class InstallSchema implements InstallSchemaInterface
{
    /**
     * {@inheritdoc}
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $installer = $setup;
        $installer->startSetup();

        /**
         * Creating table eecom_customcustomerattribute
         */
        $table = $installer->getConnection()->newTable(
            $installer->getTable('eecom_customcustomerattribute')
        )->addColumn(
            'customcustomerattribute_id',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            null,
            ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
            'Entity Id'
        )->addColumn(
            'attribute_code',
            \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            255,
            ['nullable' => true],
            'Attribute  Code'
        )->addColumn(
            'attribute_label',
            \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            255,
            ['nullable' => true,'default' => null],
            'Attribute Label'

            )->addColumn(
            'sortorder',
            \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            255,
            ['nullable' => true,'default' => null],
            'Sort Order'

// edited from here
            )->addColumn(
            'inputtypeforstoreowner',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            1,
            ['nullable' => false,'default' => 0],
            'Input Type For Store Owners'

            )->addColumn(
            'valuerequired',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            1,
            ['nullable' => false,'default' => 0],
            'Value Required'


            )->addColumn(
            'inputvalidationforstoreowner',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            1,
            ['nullable' => false,'default' => 0],
            'Input Validation For Store Owners'


            )->addColumn(
            'displayfieldinform',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            1,
            ['nullable' => false,'default' => 0],
            'Dispaly Field In Form'


        )->addColumn(
            'status',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            1,
            ['nullable' => false,'default' => 0],
            'Status'
        )->setComment(
            'Eecom CustomCustomerAttribute Table'
        );
        $installer->getConnection()->createTable($table);
        $installer->endSetup();
    }
}

i just need suggestion on how to take it further can any one explain it to me it will be a great help.
Thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *