how to make a field required when it cannot be found in studio as it is a product of relationship?

I created a new module that has a relationship with two other modules. One of the module lets call eating, the other let's call drinking. My module let's call it paying. Now my module paying has a one-to-one relationship with eating, and many-to-one relationship with drinking.

The problem here is that for eating, I can edit the connected field but for drinking, I cannot as it is not in the studio builder or the module builder. It is not present in the field list.

So I was wondering how can I make this missing field required when it can be found in the layout but not in the fields list?

Parents
  • Hello Rodolfo Tuble,

    You can achieve this by some coding.You need to follow some steps.

     1. Create file on this location "custom/Extension/modules/<module_name>/Ext/Vardefs/<cstm_your_relationfield_name>.php".

     2. Add code in <cstm_your_relationfield_name>.php file.

    $dictionary['Account']['fields']['<cstm_your_relationfield_name>']['required'] = true;

    3.Do Repair and Rebuilt.

    Let me know if you need more help.

    -BPATEL

Reply
  • Hello Rodolfo Tuble,

    You can achieve this by some coding.You need to follow some steps.

     1. Create file on this location "custom/Extension/modules/<module_name>/Ext/Vardefs/<cstm_your_relationfield_name>.php".

     2. Add code in <cstm_your_relationfield_name>.php file.

    $dictionary['Account']['fields']['<cstm_your_relationfield_name>']['required'] = true;

    3.Do Repair and Rebuilt.

    Let me know if you need more help.

    -BPATEL

Children