How to add status field on module based on some condition?

I have use case where when I click on 'Activate' button ,an API is trigerred which will show an alert boc saying "Account is activated". 

Now , I want to add one field like below screen which will refelct the status of accounts. <<Ignore module name and other information it's just for reference>>

Please help me with some suggestions or any code snippet.

Parents
  • Hi  I have added below line of code in custom/modules/<modulename>/clients/base/views/record/record.php

    Bt it is not visible on screen. Also created en_us.status.php file in custome/Extensions/modules/<<modulename>>/Ext/Language. 

    Please suggest if any thing is missing. 

    record.php

    array (
    'name' => 'panel_header',
    'label' => 'LBL_PANEL_HEADER',
    'header' => true,
    'fields' =>
    array (
    0 =>
    array (
    'name' => 'picture',
    'type' => 'avatar',
    'size' => 'large',
    'dismiss_label' => true,
    'readonly' => true,
    ),
    1 =>
    array (
    'name' => 'name',
    ),
    2 =>
    array (
    'name' => 'activate',
    'label' => 'LBL_ACTIVATE',
    'type' => 'follow',
    'readonly' => true,
    'dismiss_label' => true,
    ),
    ),
    ),

Reply
  • Hi  I have added below line of code in custom/modules/<modulename>/clients/base/views/record/record.php

    Bt it is not visible on screen. Also created en_us.status.php file in custome/Extensions/modules/<<modulename>>/Ext/Language. 

    Please suggest if any thing is missing. 

    record.php

    array (
    'name' => 'panel_header',
    'label' => 'LBL_PANEL_HEADER',
    'header' => true,
    'fields' =>
    array (
    0 =>
    array (
    'name' => 'picture',
    'type' => 'avatar',
    'size' => 'large',
    'dismiss_label' => true,
    'readonly' => true,
    ),
    1 =>
    array (
    'name' => 'name',
    ),
    2 =>
    array (
    'name' => 'activate',
    'label' => 'LBL_ACTIVATE',
    'type' => 'follow',
    'readonly' => true,
    'dismiss_label' => true,
    ),
    ),
    ),

Children