Hi Jan,
I've been looking at building a plugin to make PhocaPDF available for ChronoForms form output. I've started tracking through the code and it's not completely obvious what needs to be done.
I can see that the Content Plugin re-writes the pdf link from an article page and adds &format=phocapdf to the url.
I can see that there are a couple of new events in the plugin and that you have a listener inside the switch in files.phocapdf/phocapdf.php - I assume that I'll need to add a new case here.
What I am not clear about is if I send html output from chronoforms with format=phocapdf is that enough or is there some other pre-processing of the output that needs to be done?
Bob
Building a Plugin for ChronoForms
-
- Phoca Newbie
- Posts: 3
- Joined: 28 May 2008, 11:02
- Location: France
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Building a Plugin for ChronoForms
What I am not clear about is if I send html output from chronoforms with format=phocapdf is that enough or is there some other pre-processing of the output that needs to be done?
Hi, this depends on you which content will be sent.
Usually components have specific file for displaying the content in PDF, so e.g. content component has these files in article view:
view.html.php (prepared data for html output)
view.pdf.php (prepared data for pdf output), so for chronoform component you need to create such file where you define html output for pdf document. This html output will be then displayed in PDF.
Hi, this depends on you which content will be sent.
Usually components have specific file for displaying the content in PDF, so e.g. content component has these files in article view:
view.html.php (prepared data for html output)
view.pdf.php (prepared data for pdf output), so for chronoform component you need to create such file where you define html output for pdf document. This html output will be then displayed in PDF.
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 28 May 2008, 11:02
- Location: France
Re: Building a Plugin for ChronoForms
Hi Jan,
Sorry, I forgot to subscribe and missed your reply until I came back again.
For better or worse, ChronoForms doesn't have views that can readily be adapted. Most often the form data is stored into a database table and/or emailed off to the admin. However there are some users who want 'printable' or pdf copies of the results usually to record some more formal 'form'.
I've been successful in saving from a ChronoForms form to a Joomla article and creating a pdf with phocapdf from the article link but that still seems a long route round.
I'm off on holiday for a couple of weeks and will take another look when I'm back.
Best wishes
Bob
Sorry, I forgot to subscribe and missed your reply until I came back again.
For better or worse, ChronoForms doesn't have views that can readily be adapted. Most often the form data is stored into a database table and/or emailed off to the admin. However there are some users who want 'printable' or pdf copies of the results usually to record some more formal 'form'.
I've been successful in saving from a ChronoForms form to a Joomla article and creating a pdf with phocapdf from the article link but that still seems a long route round.
I'm off on holiday for a couple of weeks and will take another look when I'm back.
Best wishes
Bob
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Building a Plugin for ChronoForms
Ok
If you find Phoca extensions useful, please support the project