Forums

Param/Fields map in ReDirect URL

santosh.karkhanis 14 May, 2014
When I try to set the Param/Field map, the system is not picking field values, but directly the text. I need a few parameters as fixed & a few variable depending on field value.
The Param/Field I set as
option=com_chronoforms
chronoform=Dropdown-test-1
xID=xID

Where xID is a Field name in my form, which I wish to pass to another form.
But the redirect URL is not capturing field value. The redirect URL is
http://karkhanisgroup.com/jidnyasa/index.php?option=com_chronoforms&chronoform=Dropdown-test-1&xID=xID

Can anyone help?
Max_admin 15 May, 2014
Answer
For v4 please try to use this format instead:
xID={xID}


Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
teldrive 11 Jun, 2014
Hi Max I am trying to do same in CFv5->CCv5 ( I know usually i have connection action to do this)
I explain better from CCv5 I go to edit action to CFv5 form but I need some especial dropdown Form for editing some fields
Flow goes CCv5-->edit(CF1:load)->editfield(CF2:load)-->edit(CF1:load)->CCv5

in CF2->redirect action I set
http://midomain/component/chronoconnectivity5/?cont=lists&ccname=ver_paper_list&act=edit&gcb={gcb}

what I see in browser is
http://midomain/component/chronoconnectivity5/?cont=lists&ccname=ver_paper_list&act=edit&gcb=%7Bgcb%7D 😲
Max_admin 14 Jun, 2014
Maybe you should try to do it as a multi page form ? there is also no need to redirect, the last form/page should run the "Connection action" which should run the connection's save action, that should redirect to the connection automatically.

You may also include a hidden field in your form named "gcb" to pass the id

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
teldrive 16 Jun, 2014
Hi Max thanks by reply, after some testing i realized i couldn't use variables with redirect-action, I saw this answer on this forum and it worked for me

<?php
 $mainframe =& JFactory::getApplication();
 $mainframe->redirect('http://midomain/es/component/chronoconnectivity5/?cont=lists&ccname=ver_paper_list&act=edit&gcb='.$form->data['gcb'].'&hospitales='.$form->data['paper']['hospitales']);
 ?>
GreyHead 16 Jun, 2014
Hi TelDrive,

You can use variables with the cURL* and ReDirect actions in CFv 4 and CFv5. The syntax is
param_a=string value
param_b={form_input_name}

Bob

* The oddity is the standard cURL action in CFv4 where you can only use form variables using
param=variable_name
so any string value shave to be added to the $form->data array (or you can use my cURL [GH] action which accepts both).
teldrive 16 Jun, 2014
Hi Bob
Thanks by reply, I tried before, but let me know if this approach is correct for this CURL action(i didn't get it working)
my redirection link is
http://midomain/es/component/chronoconnectivity5/?cont=lists&ccname=ver_paper_list&act=edit


and i need to add to this link the variable parameter &gcb=80

so i set in target url previous link , header in response to no, and fields map
param_a=gcb
param_b={gcb}


also I tried with
gcb={gcb}


debug not sure if helps
    [curl] => <!DOCTYPE html>
<html xml:lang="es-es" lang="es-es" dir="ltr">
<head>
  <base href="http://midomain/es/component/chronoconnectivity5/" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <title>Congreso Seden 2014</title>
  <link href="http://midomain/es/component/chronoconnectivity5/?cont=lists&ccname=ver_paper_list&act=edit" rel="canonical" />
  <link href="/templates/yoububble/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
  <link rel="stylesheet" href="http://midomain/libraries/cegcore/assets/bootstrap/css/bootstrap.css" type="text/css" />
  <link rel="stylesheet" href="http://midomain/libraries/cegcore/assets/bootstrap/css/bootstrap-theme.css" type="text/css" />
  <link rel="stylesheet" href="http://midomain/libraries/cegcore/assets/bootstrap/css/bootstrap-gcore.css" type="text/css" />
  <link rel="stylesheet" href="http://midomain/libraries/cegcore/assets/font_awesome/css/font-awesome.css" type="text/css" />
  <link rel="stylesheet" href="http://midomain/libraries/cegcore/assets/css/system_messages.css" type="text/css" />
  <link rel="stylesheet" href="http://midomain/templates/yoububble/css_compiled/template-brick.css" type="text/css" />
  <style type="text/css">
body{font-size:12px;}
GreyHead 16 Jun, 2014
Hi teldrive,

If you want to ReDirect the user, use the ReDirect action, not the cURL action - that is used for sending data to another URL.

I'd also convert the URL to a non=SEF version and put the elements into the Param/Fields box'
Target URL: http://midomain

Params/Fields:
lang=es
option=chronoconnectivity5
cont=lists
ccname=ver_paper_list
act=edit
gsb={gcb}
teldrive 16 Jun, 2014
Hi Bob , you helped me to see the light 😉
the right sintaxis is
http://midomain/es/component/chronoconnectivity5/?cont=lists&ccname=ver_paper_list&act=edit

and for the extra params
gcb=gcb

I don't know why, but it seems "static" extra params are not supported , on this case edit action is omitted
act=edit
gcb=gcb
GreyHead 16 Jun, 2014
Hi teldrive,

My apologies, I should have checked more closely about which action does which.

The workaround for the actions that only don't' accept fixed strings is to use Custom Code action before them. So if you put this in the Custom Code action
<?php
$form->data['act'] = 'edit';
?>

Then you can use act=act in the ReDirect action.

Bob
junk4jake 02 Sep, 2014
No matter what I do, whether I use no container, square bracket, squigly bracket, double quotes, and single quotes it never puts the form information in there
teldrive 03 Sep, 2014
Hi , I f you wnat help just put more information about wht are you doing on the form
junk4jake 03 Sep, 2014
I am trying to send an SMS message after the form is completed TO a dynamic number from the form with a MESSAGE from the form
teldrive 03 Sep, 2014
please put the code you are using i have it working with dynamic variables
if you prefer you can use php code instead of CF5 action "redirect"
<?php
 $mainframe =& JFactory::getApplication();
 $mainframe->redirect('http://mydomain/component/chronoconnectivity5/?cont=lists&ccname=miform&act=edit&gcb='.$form->data['gcb']);
GreyHead 04 Sep, 2014
Hi junk4janke,

This post may help.

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