This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand
95 Posts
Edwin
4 years ago
2
Topic

Hello all

I have the Seblod Code Pack and I'm trying to grab value of one field from a table in one content type and insert it into a field of a table in another content type, and to have this new field updated everytime the form is submitted and edited. So far I am failing.

I am using: $config['storages']["#__tablename"]["fieldname"] = $fields["anotherfieldname"]->value;. I have searched the forums and the solutions offered don't quite cover my needs.

Thank you

Edwin

Get a Book for SEBLOD
4 years ago
1
Level 1

Hi edwin,

you are speaking about 2 content type.

When you are in a form of 1 content type, you can't access directly to fields of an other content type.

The only way is to request the database, depending where you do the process.


If you are in the form of the content type where you grab the value, you will make a request UPDATE on the table of the other content type.


If you are in the form of the content type where you set the value of a field depnding on an other content type, the request will be a SELECT on the other table. In this case, after the request, you can store data like the tutorial below show you.


Regards.

Lionel

95 Posts
Edwin
4 years ago
0
Level 2

Thanx Lionel. I will play around and see what I get.

Regards

Edwin

Get a VIP membership