which template for print button

Status
Not open for further replies.

Mikmac

New Member
My second question for today is this:

Under the option tab of the 'edit form' backend you can select to show a print button.

What template or css is used for the print window? It looks like it is independant of the selected form template. Or is this seperate from Fabrik and managed by Joomla?

Thanks!
 
Yes you are right.

Is there a way to override this?
(as in my other thread 7339, I am using different template views for the same form. I would also like to be able to print these views)

The layout=templatename in the url or in the formbot works fine for viewing but for printing it still grabs the view only template defined for that form.

Or maybe we can add a custom made print button to the used template??

Thanks
 
Oh actually, I am now thinking, it would be nice to have the joomla print button on the static content page doing the work, as that would print other content on that page as well.

However now, with a formbot, when you press the joomla print button it shows the code line {showFabrikForm form=x} and not the actual form.


ps any response on the previous post is still welcome as it would be useful functionality too.
 
Sorry, me again. I have to correct my previous post, it acted once like that, but now if using the joomla content print button, it shows the form but an empty one, so not the read only and not the record id.

If using the print button activated by Fabrik for that form, I noticed that if I hover the button and look at the url-link at the bottom of my browser it actually contains the layout-template name but when clicked that name has disappeared and the popup link is totally different.
 
The Joomla content Print works fine for me with different layouts defined in the formbot {} args.

The reason the visible URL on the Fabrik print link looks different is because it's actually driven by an onClick event, with the URL built on the fly in the Fabrik PHP.

I've added some code to append the layout=foo arg to the onClick URL if one has been specified on the current page URL.

-- hugh
 
Hi Hugh,

I have updated the formbot files in svn 986 (regarding this thread you changed just the file fabrik-formbot.php, didn't you?)

Situation (example)
- form 1 makes table 1 and the table has detailed link to content page 1 with formbot {includeFabrikForm form=1 layout=A}
- form 1 makes table 2 and the table has detailed link to content page 2 with formbot {includeFabrikForm form=1 layout=B}
- form 1 has layout A selected as view only template (on the edit form - templates tab)

problem 1: it is not longer a detailed view only, before I had "layout=viewTableRowDetails" in the formbot, but {includeFabrikForm form=1 layout=A layout=viewTableRowDetails} does not work.
problem 2: the joomla print button shows the right template but not the row id, just an empty editable form.
problem 3: the print button activated by Fabrik shows the right row id, but from both table 1 and 2 in layout A.

I have the feeling I am doing something very wrong...
 
Ah, well we changed the way it works slightly. I did indicate this in another thread.

You no longer use layout=viewTableRowDetails to indicate the read only form. That was preventing people from specifying a template for read only, as you can only specify one layout (or one of them will override the other, probably the last one specified).

So we added "editable=false" as an extra bot option to indicate the read only view. If you leave this option out, or set it to anything other than 'false', it defaults to the editable view.

And yes, I only did formbot so far. I'll add 'layout' as an option for the tablebot soon.

-- hugh
 
Ah, great, that solves problem 1. Problem 3 was solved with the adding to the onclick event, thanks for that.

Problem 2 is not solved, but that may go beyond the fabrik support, it looks like it is more a Joomla thing:
Clicking on that button (the joomla print button that appears in the right upper corner of the page area) shows an empty (new) record. I guess it only looks at whats defined in the formbot and that is just that specific form. Is it possible to add the current row id in some way to the onclick event of this button?

If too hard, than leave it and I will work with the by Fabrik activated print button only.
Thanx again!
 
I really have no clue why the rowid isn't getting added on the J! print link, even if it is specified on the query string for that page.

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top