HOW I DO CHRONOFORMS CREATES LOCAL PDF FILES IN A FOLDER IN SERVER WITH THE DATA SUBMITED IN A FORM???

georkhawam 08 Dec, 2018
I need help...
โ€‹
i need that when users submits data in a form, that collected data get
stored in an automatically created pdf file in a folder in my server
i've installed chronoforms in my joomla 3.x (plg, mod & tcpdf
feature)... i've created the form but don't know the correct configuration to
make the submitted data gets stored in a pdf file each one (i don't want
receive by email or anything like that)
โ€‹
thanks ๐Ÿ˜ƒ
GreyHead 10 Dec, 2018
Hi georkhawam,
โ€‹
In the form On Submit event add a TCPDF action from the Files actions group and set the 'Action' of the TCPDF action to 'Store'
โ€‹
Bob
georkhawam 10 Dec, 2018
Thank you for your reply...
โ€‹
I've tried that, but when i fill all form fields and clic on "SEND" button, i get back this error:
โ€‹
Warning: fopen(file://C:\xampp\htdocs\joomla\components\com_chronoforms6\chronoforms\pdf\pdf6.pdf): failed to open stream: No such file or directory inC:\xampp\htdocs\joomla\libraries\cetcpdf\tcpdf\include\tcpdf_static.phpon line1854TCPDF ERROR:ย Unable to create output file: C:\xampp\htdocs\joomla\components\com_chronoforms6\chronoforms\pdf\pdf6.pdf
โ€‹
face-meh-blank
GreyHead 10 Dec, 2018
Hi georkhawam,
โ€‹
Looks like the output folder you are using isn't writeable, you may need to create it and check the access settings.
โ€‹
Bob
georkhawam 10 Dec, 2018
Do you know what i have to do to solve this? or what i have to do for making folder "writeable"...?? i am a little newbie in this topics, but i feel i'm near find the solution.. thanks for helping me ๐Ÿง
healyhatman 10 Dec, 2018
Does the folder C:\xampp\htdocs\joomla\components\com_chronoforms6\chronoforms\pdf\ exist?
georkhawam 10 Dec, 2018
Wow, no... now i've created the "pdf" folder... (sometimes something stupid makes crazy ๐Ÿ˜› LOOL)
โ€‹
Now, when i fill and "send", the confirmation message i programmed appears correctly, but when i go to the folder and open the file saved, appears in white, does not contain the fields with the answers of my form... Also, i need the pdf files go accumulating in order answers are submitted, i sent responses two times but there was only one pdf file (totally empty)...
โ€‹
Have any idea of what's wrong now? I'll follow strugglin
โ€‹
Thank you for helping me, you're great ๐Ÿง
healyhatman 10 Dec, 2018
Put a debug action in and paste the response.
georkhawam 10 Dec, 2018
The secret is in the "Option#3 SETUP enable form features"... down is a box where i think there's to write some "codes" (don't know how to)...
โ€‹
Any text i write in that box appears as "answer" in the pdf document that results from sending the response from my form... (not the real fields i've programmed)
โ€‹
face-meh-blank
healyhatman 10 Dec, 2018
Yeah I don't understand what you just said sorry. Maybe a screenshot?
georkhawam 10 Dec, 2018
Here's a screenshot, take a look and see that a i've created a short form for testing (only 2 fields + send button) but this is not what i get when i go to the "pdf" file created in the folder programmed in the server... the content of that resultant pdf file is "something" that i have to write in a field that appears in the "step3 SETUP" face-meh-blankface-meh-blankface-meh-blank
โ€‹
HOW  I DO CHRONOFORMS CREATES LOCAL PDF FILES IN A FOLDER IN SERVER WITH THE DATA SUBMITED IN A FORM??? image 1
healyhatman 10 Dec, 2018
{data:field_name} will give you the data from the field as submitted.
georkhawam 10 Dec, 2018
Excellent, ๐Ÿ˜ฎ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ now in the pdf i can see the real responses of the form i've created (answers does not appears but it does no matter so much)...
โ€‹
Now i am having two little problems, but let's go with the first one:
โ€‹
As you see, the second field of my form consists in the attachment of a image file (jpg, png, gif or etc), but the problem is that in that answer what i see is "the name" of the file attached but i need the image gets shown in the pdf document (not its name)... Is possible to do that?? face-meh-blank
healyhatman 10 Dec, 2018
Yes it is. Standard html IMG tag.
georkhawam 10 Dec, 2018
Can you tell me how to do that?? i know very litte from html
โ€‹
HOW  I DO CHRONOFORMS CREATES LOCAL PDF FILES IN A FOLDER IN SERVER WITH THE DATA SUBMITED IN A FORM??? image 2
healyhatman 10 Dec, 2018
<IMG src="{var:upload_action_name.file_field.filename}"> or something along those lines use the debug to see the data available from the upload action.
georkhawam 10 Dec, 2018
Don't know how to do that... if someone knows what to do and HOW, and has the time to explain a little, it would be great help (I'm totally NOOB in html, css, javascript,etc)... ๐Ÿ˜ข sorry
georkhawam 10 Dec, 2018
C'mon guys don't leave me alone ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ i'm excited to achieve this ๐ŸคฃHOW  I DO CHRONOFORMS CREATES LOCAL PDF FILES IN A FOLDER IN SERVER WITH THE DATA SUBMITED IN A FORM??? image 3HOW  I DO CHRONOFORMS CREATES LOCAL PDF FILES IN A FOLDER IN SERVER WITH THE DATA SUBMITED IN A FORM??? image 4HOW  I DO CHRONOFORMS CREATES LOCAL PDF FILES IN A FOLDER IN SERVER WITH THE DATA SUBMITED IN A FORM??? image 5
Also of making the images can be shown in the pdf document created when submitting, i need that when a second or more submits are done, the new pdf's created does NOT remplace the previus pdf files that contains the previus form's answers... just need another pdf automatically creates with different name than prev (serially maybe)... is posible this? how can i achieve that???
โ€‹
Thx for your wise help healy & greyhead ๐ŸงHOW  I DO CHRONOFORMS CREATES LOCAL PDF FILES IN A FOLDER IN SERVER WITH THE DATA SUBMITED IN A FORM??? image 6
healyhatman 11 Dec, 2018
In your debug for the file upload action you should see [var] ( [file_field_name] ( [filename]
โ€‹
Let's pretend for a moment that you've left the upload path as standard so it's going to {path:front}\uploads
โ€‹
So in your TCPDF you need
โ€‹
<img src = "{path/url:front}uploads/{var:upload#.file_field.filename}" />
โ€‹
If you want your files uploaded outside of your web directory you will need to base_64 encode it in PHP and do a bunch of other fancy stuff to it. Which you can do yourself or pay me to do for you.
โ€‹
As to creating a different name each time...... Serially? No. Could just use {date:} in the filename to prepend a timestamp.
This topic is locked and no more replies can be posted.