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 😃
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
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
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
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 🧐
Does the folder C:\xampp\htdocs\joomla\components\com_chronoforms6\chronoforms\pdf\ exist?
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 🧐
Put a debug action in and paste the response.
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
Yeah I don't understand what you just said sorry. Maybe a screenshot?
{data:field_name} will give you the data from the field as submitted.
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
Yes it is. Standard html IMG tag.
<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.
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
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.