Forums

redirect from ccv6 to CFv6 and after submit to print results in pdf

teldrive 09 Aug, 2020
Hi everyone, may be simple but didn't find answer in forum yet
I have found very usefull to call to one CFv6-"myform" from ccv6 using {cronoform: myform} in event area passing data values from a previous read function{fn:read_db} and when I submit this form all values are automaticaly saved when return to ccv6

my question is:
if I want really submit data into "myform" and don't go to cc but to print the results (over a pdf doc for example), How can replace the normal behaviour of return to CCv6 and instead submit my form, the issue is that when I submit "myform" always return to ccv6
GreyHead 10 Aug, 2020
Ho Teldrive,

I'm not completely clear what you want to do here. One solution might be to use an event switcher in the form (or separate form events) and include a parameter in the form data or the calling URL to tell the form what you want to do e.g. &event=submit or &event=pdf.

Bob
teldrive 10 Aug, 2020
Hi Bob thanks , let me explain a little better:
on cc_v6-> myevent-> // I read some data and call to one form(cf_v6) to print this data on pdf,
{fn:read_data}
{chronoform:cf_myform}
but this works fine when I have to edit some data when I push submit its returns return to cc_v6, on this case I want that when submit go to submit area of the form but instead return to CC_v6,
the issue is how to change this behaviour, of course i have swith action in my submit area of the form but never goes there, it goes directly to cc_v6(myCC_list)
I made some workaround with a redirect function, but it has some drawbacks related to template(because this form has not menu link) and also the only link that worked form me was
http://mydomain.com/administrator/index.php?option=com_chronoforms6&cont=manager&chronoform=cf_myform
not sure if I can take out "administrator" form link (if Ido doesn't work)
Array
(
    [conn] => myCC_list
    [event] => myevent
    [Itemid] => 197
    [option] => com_chronoconnectivity6
    [view] => connection
)
I am sure that changing the content of "conn" or "option" could change behaviour of the form , making it forget the source-call but not sure
teldrive 10 Aug, 2020
I forgot to indicate that when I call with redirect link function from CCv6 to the form CFv6, i have dferente behaviour but I think is due to content of these variables, so the question is what of these or how to say to CCv6 that leaves controls to CFv6 of the submit button
Array
(
    [option] => com_chronoforms6
    [cont] => manager
    [chronoform] => cf_myform

)
teldrive 28 Aug, 2020
Answer
after some research let me share with you some advances
on ccv6 event you can set a link to a CFv6 form like this, with the advantage that after submit the form if you have an event called "submit" you can save results, etc....
the disadvantage is that control is mantained from ccv6 so only can work with one form page because after first submit returns to ccv6, very usefull then for edit records
{chronoform:cf_my_form}
if you need to redirect from ccv6 to cfv6 and lose the control from ccv6 you can use the redirect link , so you can have several submit bottoms and different pages on same form as a normal form
{redirect:?option=com_chronoforms6&chronoform=cf_myform}
the disadvantage (at least I didn't discover how)is that you can pass parameters to the form, to do this, is possible to use redirect funtion, i had some issues with the link but i discover the right one that works for me
........................in event area
{fn:cf_myredirection}
......................in function area
name:cf_myredirection
redirect url:{url:/mymenu/submenu?option=com_chronoforms6&chronoform=cf_myform}
param1={data:param1}
param2={data:param2}
the advance for me has been to find the right link to the form , may be easy and may be I am a little oxidated by holidays ;-)
This topic is locked and no more replies can be posted.