Hi there,
Great product. I need to add a link for a popup window after the submit button with the idea to print the submitted data with the cf_id as the job number for a cover sheet for the project. At the moment the settings for the form are:
General
Email the results? Yes
Load Chrono CSS/JS files? Yes
DB Connection
Enable Data STorage? Yes
Saving Data/Emails order? Before email
All data is getting saved into data base and can be searched and edited with a ChronoConnectivity form.
I've added a confirmation form in the On Submit code - after sending email that works well and displays the cf_id field:
<p>{surveyor}, the Job Number for:</p>
<p style="padding-left: 60px;"><strong>{first_name} {surname}</strong> of</p>
<p style="padding-left: 60px;"><strong>{address}</strong></p>
<p style="padding-left: 60px;"><strong>{town}</strong></p>
<p>is:</p>
<h1 style="padding-left: 60px;"><strong><?php echo $MyForm->tablerow["swsg_job_data"]->cf_id;
?></strong></h1>
When I use a static Edit Record link from ChronoConnectivity it works OK:
<a href='http://www.swsg.com.au/index.php?option=com_chronoconnectivity&connectionname=swsg&task=editrecord&cids=10148&Itemid=4'>View Details_CF_ID</a>
but if I add <?php echo $MyForm->tablerow["swsg_job_data"]->cf_id;?> instead of 10148 to get the currentcf_id, I get the following error:
"You are not authorized to view this page, Row Edit Error ".
I can copy the link location and paste into a new window and it works fine.
I'm stumped. Are you able to shed any light?
Cheers
Luke
Hi Luke,
I'm confused. I don't quite understand where ChronoConnectivity fits in this.
If you are switching between ChronoForms and ChronoConnectivity then the $MyForm object(and the cf_id value) won't be transferred unless you do something to transfer it. That value will only be available while you are processing the submission of the form.
Can you say a bit more about the work flow here please.
Bob
Hi Bob
The form [JobEntry] that I've been using to save the data has been verified using a ChronoConnectivity search query. As the ChronoConnectivity form has the {Edit Record} link, I've used that link to view a populated [JobEntry] form with the data that has just been submitted. The link in the page after the submit form works but when I select it I get the error. I can "copy the link location" and paste it, but it doesn't like the link out of the page.
Hope that's clarified it a bit.
Cheers
Luke
Yes it is in the thankyou page, the link works if I right click and "copy link location" and paste it into a new window but the link will not work out of the thankyou page.
Cheers
Luke
Hi Luke,
Ok - now I understand . . . but I've no idea why a link should work with copy and paste but not whne you click it . . . :-(
Bob
PS I tried to take a look but the page is for registered users only.
Hi Luke,
Thanks for the login.
For me - both clicking and copy & paste give the same error. I've taken a look at Max's code and I think it has something to do with the way that permissions are set - but the code makes my eyes cross and I can't pin down the problem right now.
I would change approach and link directly to a ChronoForm to display the info - probably using the profile plugin.
Bob
I can get the link to work if I go into the Connectivity Search (off the menu) and go to the last page that lists the new record. I have to literally go to the end link in the search and then the "View or Print Details/Coversheet_Popup" and the "View Details_CF_ID" links will work. It won't work from the first page of the search results only the last. Suppose it's got something to do with ChronoConnectivities link that I used. Is there anyway else to get the link to work?
Luke
By the way I have the search open in another window.
Thanks for your help and speediness of your response. I've found some docos on the plugin and I'll give it a shot and let you know.
Great extension, even better support.
Cheers
Luke
Hi Bob
I've been searching the forums but have been unable to find a working solution. My main goal is to have a printable form that is generated by the onsubmit button and populated with the data that has just been entered. The main goal is for the cf_id to be shown as it is a job number for the data.
I've tried a number of solutions inc Profile Page and Multi Forms but have been unable to get them to work.
Are you able to assist with a working solution?
Cheers
Luke