Display a form in a module with the related row id

bcouvin 07 Jan, 2016
Hello,

I would like to display a Chronoform based on the form name and the id of the row. I would liketo do it from a javascript function.

My use case is:
I got my row id in a javascript function. I would like to call a form and display it in a joomla module, knowing that this form has to display the data related to the row id.


So, my question is double:

(1)- How to call a form with the related data, based on the known row ID? I see that I have to put some information in URL like this:
...option=com_chronoforms5
...act=???
...Chronoform=OK, I know this
...table= OK, I know this
...id=??? Have to find it with a php code

(2)- How to push this form in a joomla module, based on to joomla template position?

Do you have an example that I can have a look?

Thanks
Bertrand
GreyHead 07 Jan, 2016
Hi Bertrand,

For 1. you can add a link including an id parameter.

For 2. I have no idea :-(

Bob
bcouvin 07 Jan, 2016
Bob,

For the first point ok,
Could you help me to add the correct parameter to give to the form?
or where I can find the documentation to understand the mechanism to get this working. Sometime is with act, sometime is with Chronoform, sometime with required specified table.

For the second point, it may be could be found on the net.

Thanks a lot!

Bertrand
GreyHead 08 Jan, 2016
Hi Bertrand,

Please turn on the Debugger for the CC listing and copy and paste the output here. That should show you what the name of the row id parameter is.

Bob
bcouvin 08 Jan, 2016
Hi Bob,

I read your suggestion twice, I think my question was not clear.

When you proposed:
Please turn on the Debugger for the CC listing and copy and paste the output here. That should show you what the name of the row id parameter is.

I got this:
http://............?cont=lists&ccname=ProjectList&act=view&gcb=3

I suppose that you mean gcb=3 which is the row id in the table handled by the main model of CC. Here is the project_id, number 3.

My point is that in CCv5, I have a dropdown list (for each row) which contains the list of users.

I am not calling the row (the project in this case) of the listing for viewing or editing the project. I would like to call a Chronoform to display the information of user.

So, the parameters cont=lists&ccname=ProjectList&act=view&gcb=3 are not the correct one.

How can I call the right chronoform to display the information of the user? I am looking in the forum, I am still stuck on this.

Hope you understand my point.

Bertrand
GreyHead 09 Jan, 2016
Hi Bertrand,

I think that the 3 here should be the record ID from the main table. Will that not work?

Bob
bcouvin 10 Jan, 2016
Hi Bob,

The number 3 here is the ID for the row in the listing which is also the ID of the project. In this row, I have a dropdown list which figures out the list of the project team members. Let take a look on my image joined of my listing:
Display a form in a module with the related row id image 1

What I would like to have is that when I select the member of this project (project ID = 3), CCv5 will open the form related to the infos of the member. This member has its own user id. This form has the name UserInfos. The form of the project has the name ProjectInfos.

In fact, I would like to redirect the URL related to the member UserInfos of the project ID number 3 when I select the Project member.

This link is not good (http://............?cont=lists&ccname=ProjectList&act=view&gcb=3), because it opens the project infos.

Thanks in advance for your help.
Bertrand
bcouvin 21 Jan, 2016
Answer
Hello,

Problem solved with ajax on change trigger on Selector.

Bertrand
This topic is locked and no more replies can be posted.