Forums

Access to parameters in CC%

tshirley 08 Apr, 2015
Hello,

I have a CF5 form (Form1) which passes parameters to a CC5 connection, to allow filtering of the selection. This works well.

I am also using a link field in the Connection to call another CF5 form (Form2) for record editing. Again, this works well.

I would like to pass a parameter from the first CF5 form to the second, which is not used by the CC5 connection.

For example:

1. Form1 passes ...&dept=finance&requestor=boss to the connection.

2. The parameter "dept" is used in the Conditions array of the model to select which records to display. I use JRequest to get the two parameters and store them as $dept and $requestor.

3. On selection of the record for editing, I want to add the parameter "requestor=boss" to the url calling the editing form, so that the editing form can know who requested this edit.

I tried adding &requestor={$requestor} to the link url but there was no substitution. I tried several variations on the theme with no success. In all cases I can use curly brackets to substitute field values from the selected row, but not to pass anything other than a fixed value parameter.

Can anyone suggest how I can access the incoming parameter to build a link url?

Cheers

Tim
GreyHead 17 Apr, 2015
Hi Tim,

Where and how are you creating the link URL?

You can use either {requestor} in HTML, or $form->data['requestor'] in PHP

Bob
tshirley 17 Apr, 2015
Hi Bob,

I have a CF5 form (Form1) that calls a CC5 connection. However instead of the default edit process, I needed to go to a custom edit form (Form2) called by clicking a link on a column.

But I also wanted to pass a parameter &requestor=xxx from Form1 to Form2, effectively passing via the Connection.

In the conditions of the model I read the parameter into a $requestor field using JRequest.

I created a URL in the Links box of the Front List, to call the custom edit form. So this is where I am trying to add the parameter.

The link I have looks like :

oprpt.cf_id:http://mydomain.com/component/chronoforms5/?chronoform=Form2&cf_id={oprpt.cf_id}&Mbr={oprpt.member}&requestor=......

The question is, what to put in the ..... above to retrieve the incoming parameter. I have tried $requestor, {requestor}, {$requestor}, and $form->data['requestor'] without success.

The link works perfectly either without the final parameter or with a fixed value such as &requestor=Boss.

Hope this is clear...

Cheers

Tim
GreyHead 17 Apr, 2015
Hi Tim,

I had a hunt around in the code but I can't see if it is possible or not :-( This is one for Max I'm afraid.

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