It is possible to create an option to print the form you just filled the User?
Hello joaoantonio,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I add a Print button to my form?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I add a Print button to my form?
P.S: I'm just an automated service😉
where an how could I set some css to my printform?
Could you give me an example please?
Whrer I have to fill in the css-file or direct styles?
Thanks a lot!
Could you give me an example please?
{
var html, css, csss_file, printWin;
css = \"\";
css = \"<style type='text/css'>\"+css+\"</style>\";
css_url = '';
if ( css_url !== '' ) {
css_url = \"<link rel='stylesheet' type='text/css' href='\"+css_url+\"' media='print' />\";
}
Whrer I have to fill in the css-file or direct styles?
Thanks a lot!
Hi Breakbeatz,
As a text string here css = \"\";
Or from a file with a url set here css_url = '';
Bob
As a text string here css = \"\";
Or from a file with a url set here css_url = '';
Bob
But how?:-)
could you give me an example?
could you give me an example?
Hi Breakbeatz,
Bob
css = ".some_class { border: 1px solid blue; }";
css_url = JURI::root().'some_folder_path/some_file_name.css';
Bob
Hi Bob,
both doesn't work correct and hide the Printbutton...
And I cant print it at this time, the preview is correct in the windows, but if I'll print it, its just a blanc page:
http://www.uptodate-24.de/index.php?option=com_chronoforms&chronoform=Basisformular-Copy
both doesn't work correct and hide the Printbutton...
And I cant print it at this time, the preview is correct in the windows, but if I'll print it, its just a blanc page:
http://www.uptodate-24.de/index.php?option=com_chronoforms&chronoform=Basisformular-Copy
Print works! I forgot to delete something from my tests, but I want to have alle my fields in a horizontal row, like on the webpage, at this time all ist vertical...
Its the old problem, I can't get the same css in the printview like in the form...
Sorry, you got right.
I can't include the css in the print-view.
If css_url = JURI::root().'some_folder_path/some_file_name.css'; the Print-Btton is gone and I need to give the print-div the global css-style, but it don't work.
Could you take a look on the page?
http://www.uptodate-24.de/index.php?option=com_chronoforms&chronoform=Basisformular-Copy
I can't include the css in the print-view.
If css_url = JURI::root().'some_folder_path/some_file_name.css'; the Print-Btton is gone and I need to give the print-div the global css-style, but it don't work.
Could you take a look on the page?
http://www.uptodate-24.de/index.php?option=com_chronoforms&chronoform=Basisformular-Copy
In the code you have earlier, just replace "css_url" with the link to your print css file, in order to test that link, you can simply paste it in the browser's address bar!
Regards,
Max
Regards,
Max
Hi Max,
sorry, I don't know which link do you mean. Could you gave me an example, how I'll put the css-link to the link, which I have to copy into the adressbar?
sorry, I don't know which link do you mean. Could you gave me an example, how I'll put the css-link to the link, which I have to copy into the adressbar?
Ok, first way, please use code like below in a "custom code" action:
2nd solution, just use a "load CSS" action with a code like this:
Regards,
Max
$doc =& JFactory::getDocument();
$doc->addStyleSheet( 'http://www.example.com/css/mystylesheet.css', 'text/css', 'print' );
2nd solution, just use a "load CSS" action with a code like this:
@media print {
form {
font-size: 12pt;
font-color: #000000;
}
}
Regards,
Max
I tried all, but the first solution doesn't change anything, the second killed my Print Button...
I know that I'm doing anything wrong, but I don't know what...
By the way: Great support! Thanks a lot!
<?php
$doc =& JFactory::getDocument();
$doc->addStyleSheet( 'http://www.uptodate-24.de/components/com_chronoforms/css/frontforms_tight.css', 'text/css', 'print' );
@media print {
form {
font-size: 18pt;
font-color: #000000;
}
}
$script = "
function printPage2()
{
var html, css, csss_file, printWin;
css = \"\";
css = \"<style type='text/css'>\"+css+\"</style>\";
css_url = '';
if ( css_url !== '' ) {
css_url = \"<link rel='stylesheet' type='text/css' href='\"+css_url+\"' media='print' />\";
}
html = '<html><head>'+css+css_url+'</head>'+$(id).innerHTML+'</html>';
printWin = window.open('', '', 'left=100, top=100, width=600, height=400, toolbar=0, scrollbars=0, status=0' );
printWin.document.write(html);
printWin.document.close();
printWin.focus();
printWin.print();
printWin.close();
}
var id;
window.addEvent('domready', function() {
id = 'angebot_div';
$('print_angebot').setStyle('visibility', 'visible');
$('print_angebot').addEvent('click', printPage2);
});
";
$doc->addScriptDeclaration($script);
?>
I know that I'm doing anything wrong, but I don't know what...
By the way: Great support! Thanks a lot!
Why not simply use the code in the FAQ then and just change this line:
Please follow the code in FAQ since you are using it to add the button as well!
Regards,
Max
css_url = 'http://www.uptodate-24.de/components/com_chronoforms/css/frontforms_tight.css';
Please follow the code in FAQ since you are using it to add the button as well!
Regards,
Max
This topic is locked and no more replies can be posted.