• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Enable/Disable Form Fields - Lists with Relationship

tiagovareta

Member
Hi,

I have 3 lists / tables:
- Boxes
- Customers
- Registration Boxs -> Clients

In the "Registration Boxes -> Clients" table, I have several fields, among them the "Client Id" + "Box Id" link.
So far everything is right!

The issue is that when I enter the Client, and I will add a record, the field of "Client Id" appears, which does not make sense to appear, since we are already inside the client. The same happens when I enter a box and I am going to add a record, the "Box Id" field appears.

The idea will be:
- Inside the client form: hide the "Client Id" field from the records table, and show all others ( including "Box Id");
- Inside the boxes form: hide the field "Box Id" from the records table, and show all others ( including "Client Id");

How can I do this?
 
Hi,

I have 3 lists / tables:
- Boxes
- Customers
- Registration Boxs -> Clients

In the "Registration Boxes -> Clients" table, I have several fields, among them the "Client Id" + "Box Id" link.
So far everything is right!

The issue is that when I enter the Client, and I will add a record, the field of "Client Id" appears, which does not make sense to appear, since we are already inside the client. The same happens when I enter a box and I am going to add a record, the "Box Id" field appears.

The idea will be:
- Inside the client form: hide the "Client Id" field from the records table, and show all others ( including "Box Id");
- Inside the boxes form: hide the field "Box Id" from the records table, and show all others ( including "Client Id");

How can I do this?

Hello, can anyone help me in this situation?
 
Can you not just set the elements to be hidden?

-- hugh

Hi Cheesegrits,

If I set both fields as hidden, I will not see in the form.

What I intend is:
- Inside the client form: hide the "Client Id" field from the records table, and show all others ( including "Box Id");
- Inside the boxes form: hide the field "Box Id" from the records table, and show all others ( including "Client Id");

That is, I need to see the "Client ID" field in the form of the boxes, and the "Box ID" field in the client form. Como os campos estão no mesmo formulário/tabela, se ocultar um campo, vai ocultar nos dois "subforms Boxes + Clients"
Can you not just set the elements to be hidden?

-- hugh

Hi Cheesegrits,

If I set both fields as hidden, I will not see in the form.

What I intend is:
- Inside the client form: hide the "Client Id" field from the records table, and show all others ( including "Box Id");
- Inside the boxes form: hide the field "Box Id" from the records table, and show all others ( including "Client Id");

That is, I need to see the "Client ID" field in the form of the boxes, and the "Box ID" field in the client form. As the fields are in the same form / table, if you hide a field, it will hide in the two "Boxes + Clients subforms"....
 
I still don't understand. If the "client form" and "boxes form" are separate forms, then the elements can be configured independently.

I'm confused as to how they are the "same form / table", but in different forms (client and boxes).

-- hugh
 
I still don't understand. If the "client form" and "boxes form" are separate forms, then the elements can be configured independently.

I'm confused as to how they are the "same form / table", but in different forms (client and boxes).

-- hugh

Hi Cheesegrits,

Thank you for your response!

I have 3 tables: Clients, Boxes, Registration Boxes/Clients

Clients Table Fields:
- Id
- Name
- Email

Boxes Boxes Fields
- Id
- Box
- Category

Fields Registration Boxes/Clients
- Id
- Clients Id
- Id Box
- Product
- Amount

The "Registration Boxes/Clients" table is relationship to the tables: Clients and Boxes.

Operation of the Customers Form:

When I enter the client form, on a tab I have the data of the client (Name, Email) and in another tab (in table view), I have the fields of the related table "Registration Boxes/Clients", which looks like this:
Client | Box | Product | Amount

When I am viewing/adding in this second tab, I do not need the client field (select the client), since I am already inside the client form and through the relationship assumes the client id automatically. In other words, it was intended to hide the client field, thus:
Box| Product | Amount

I can not hide the "Client" element, because then I'll need it in the boxes form. And by hiding the hidden element later in the two forms (Clients and Boxes).

Operation of the Boxes Form:

When I enter the form of boxes, on a tab I have the data of the box (Box, Category) and in another tab (in table view), I have the fields of the related table "Registration Boxes/Clients", which looks like this:
Client |Box | Product | Amount

When I am viewing/adding in this second tab, I do not need the box field (select the box), since I am already inside the box form and through the relationship assumes the box id automatically. In other words, it was intended to hide the box field, thus:
Client| Product | Amount

I can not hide the "Box" element because I'll need it later on the clients form. And by hiding the hidden element later in the two forms (Clients and Boxes).

Summing up:
- In the "Boxes" form I need to have the Clint field and hide the box field from the "Registration Boxes/Clients" table.
- In the "Clients" form I need to have the boxes field and hide the client field from the "Registration Boxes/Clients" table.

In the element area, when I select clients form, two groups appear:
- Clients
- Registration Boxes/Clients

Supposedly when selecting the group: Registration Boxes/Clients, I would define actions of the elements in the Clients form, right?
But when I'm editing an element there, the options appear: Element is a child of: Clients Edit» Client or Click to unlink and edit this element

I always use the option: Element is a child of: Clients Edit» Client

Do you use the: Click to unlink and edit this element
And hide the client field, will only hide the field in the clients form?

What is the best way to solve this situation?
 
Do you use the: Click to unlink and edit this element
And hide the client field, will only hide the field in the clients form?

Yes. Sorry, I assumed you'd already tried that.

When you first create any kind of copy of an element (like having a list join to it from another list/form, such that you now have a copy of the element attached to the other form), it is "linked" to the original, such that any changes you make to the original will affect all linked copies. This is just a convenience to make it easier to maintain multiple copies of an element, where you don't need any independent changes to any of the copies.

If you want to independently configure a child element, you just unlink it. Once unlinked, the 'child' no longer inherits changes to the parent, and can be configured independently. Then (for example) it can be visible on one form and hidden on the other.

-- hugh
 
Yes. Sorry, I assumed you'd already tried that.

When you first create any kind of copy of an element (like having a list join to it from another list/form, such that you now have a copy of the element attached to the other form), it is "linked" to the original, such that any changes you make to the original will affect all linked copies. This is just a convenience to make it easier to maintain multiple copies of an element, where you don't need any independent changes to any of the copies.

If you want to independently configure a child element, you just unlink it. Once unlinked, the 'child' no longer inherits changes to the parent, and can be configured independently. Then (for example) it can be visible on one form and hidden on the other.

-- hugh

Hi Cheesegrits,

If I unlink this element from the main form, what happens? Does everything work normally (how did it work with the link)?
 
Yes, everything works fine.

The only difference, once you unlink a copy, is that it no longer inherits any changes you make to the original.

That's literally the only difference. Linked or unlinked, you still have two versions of the element - one on form A ("parent"), one on form B ("child" copy). When they are linked, if you make a change to A, B will inherit the change (so if you hide A, B hides), and you can't make independent changes to B (Fabrik tells you it's a linked element, and won't let you edit it without unlinking it). Once you unlink B, it can be configured independently.

Note that unlinking is permanent. You can't re-link it. So from that point on, changes made to A (the parent) will no longer be inherited by B (the child).

-- hugh
 
Yes, everything works fine.

The only difference, once you unlink a copy, is that it no longer inherits any changes you make to the original.

That's literally the only difference. Linked or unlinked, you still have two versions of the element - one on form A ("parent"), one on form B ("child" copy). When they are linked, if you make a change to A, B will inherit the change (so if you hide A, B hides), and you can't make independent changes to B (Fabrik tells you it's a linked element, and won't let you edit it without unlinking it). Once you unlink B, it can be configured independently.

Note that unlinking is permanent. You can't re-link it. So from that point on, changes made to A (the parent) will no longer be inherited by B (the child).

-- hugh


Hi Cheesegrits,

Thanks in advance for your availability, help and answers!

I tried unlink the fields and worked as intended.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top