Buy Now
Sign in

Add Print Button to Print User Submitted Information

cruser , July 19 at 20:25
C
cruser
I have a work order form setup in ChronoformsV6 that allows users to submit requested work. I use a form in ConnectivityV6 to edit the information that user submitted so the order can be assigned to employees, status updates, etc. Once I have that information edited I need to be able to send the page containing the information to a printer so the page can be handed out to the employee. So far I cannot figure out how to add something like the code below without getting an error 404 in my admin console:
<a href="#" onclick="window.print();return false;">Print this page</a>
Can anyone please help? I've searched and searched and I help is what I need!
GreyHead
Hi cruser,
There is a FAQ here for CFv4 and v5 that might help you do this?
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
C
cruser
What I am trying to do should be done in Chronoforms and not in Connectivity?
healyhatman
You can do pretty much anything from CF in CC and vice versa.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
And this where I am stuck. I just cannot wrap my mind around how to make this work in ConnectivityV6. If you have a way, please share!
healyhatman
Create a HTML view with the code Bob supplied, let's call this "print_link"
In your index event (or whatever event you want it shown in), in the place you want it shown, call the view with {view:print_link}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
I cannot get the code in the FAQ's to work in CCV6, o be sure there is an easier way. Adding code from "Code for ChronoForms v4 using MooTools" section throws a 404 and adding code from "Code for ChronoForms v5 using jQuery" has no effect, nothing is displayed. Is there another way around this?
healyhatman
I put that code that YOU provided on my connection and it worked instantly. What's the problem exactly?
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
healyhatman
Don't event need to put it in a view, just put it straight into the eventUntitled.png
Attachments
Untitled.png
Untitled.png
(19.67 KiB)
84 Downloads/Views
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
ODD! Each time I save my connection with the simple print code I provided my site throws a 404 error.image1.jpg
image2.jpg
Both CF and CC are V6 and both are validated on my domain.
Attachments
image1.jpg
image1.jpg
(280.35 KiB)
99 Downloads/Views
image2.jpg
image2.jpg
(469.36 KiB)
94 Downloads/Views
C
cruser
The 404 error spawns when I save the connection with that print code in it.
healyhatman
Check your server's mod_security settings, it's probably filtering out a certain string and breaking it.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
Could it be that? I can save the print code above anywhere else in the site (except CF and CC) without error.
healyhatman
That EXACT thing has happened to me multiple times so yes : check mod_security or the logs for same. NOT PHP error logs, but actual SERVER logs.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
I removed onclick from the code and I can save without getting a 404 and the print link shows up. But without onclick the link does not work. How do I allow that?
healyhatman
I just told you.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
Request:
[div]POST&nbsp;/administrator/index.php?option=com_chronoconnectivity6&cont=connections&act=edit
[/div]
[div]Action Description:
Access&nbsp;denied&nbsp;with&nbsp;code&nbsp;403&nbsp;(phase&nbsp;2).
[/div]
[div]Justification:
Pattern&nbsp;match&nbsp;"(?:< ?script|(?:<|< ?/)(?:(?:java|vb)script|about|applet|activex|chrome)|\\%env|< ?i?frame&nbsp;?src&nbsp;?=&nbsp;?(?:ogg|gopher|data|php|zlib|(?:ht|f)tps?):/|(?:\\.add|\\@)import&nbsp;|asfunction\\:|background-image\\:|e(?:cma|xec)script|\\.fromcharcode|get(?:parentfolde&nbsp;..." at&nbsp;ARGS:_formchunks[0].
***************************
This is what I see in ModSecurity Tools. I am assuming that when I save the print code in CF or CC that it is creating a pattern that matches a rule. If I update/change a rule am I allowing more vulnerabilities?
[/div]
healyhatman
No idea sorry. Maybe? Don't think so though should be fine.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
Rather than modding the rules, etc, I updated the views table in MYSQL by placing the code there and saved it. The print link works now. Thanks for the help healyhatman
C
cruser
The biggest issue with my "workaround" is that I cannot edit the connection via the url/administrator link, I have to edit in MYSQL.