Forums

Related tabels

navajofra 05 Apr, 2010
I have for instance the following output in CC:

63 Name XXXX United Kingdom London Art Edit Del

The details of the Name XXXX are stored in another database table. I would like to link to the detail page of the 'Name XXXX', so that the form with all details get listed in a new window.

Is this possible in CC and does anybody knows the coding?
I think I have to create a link with the actual Cf_user_id field.
I tried to figure it out for hours and hours how it works. But I had no success do far.
Most of the time I get the message: I am not allowed to view the table.

Does anybody know how I have to code the link to show the related Name record of another table in a form?
navajofra 05 Apr, 2010
I use the page plugin and created a link in my chronoconnectivity connection file as

<a href="http://mydomain/index.php?option=com_chronocontact&chronoformname=rofile&id={cf_user_id}" target="_blank">{name XXXX} </a>

I think this link is not safe and every user can swap the number of the paramater 'id' so he might get the datas of any other persons saved in the database. He should not be authorized to do it.

Any help?
GreyHead 06 Apr, 2010
Hi navajofra,

In this case add a check to the Form HTML to make sure that the id of the current user matches the id in the URL and if not redirect them.

In general I prefer not to use serial numeric ids for this purpose but add a short unique random string as a column in the database record (like AS879F) so that it's practically impossible to guess other valid urls. (You could use the ChronoForms UID but that makes the URLs a bit ugly.)

Bob
navajofra 06 Apr, 2010
Yes it is a good solution. It have already programmed it and it works fine
Thx for you quick support GreyHead. will see later f I get it to work with the UID.
This topic is locked and no more replies can be posted.