Hi,
In my form connect with CCv5, I have a file field who don't save value nor file in directory and I can't save user_id value also. I would user_id take current user id.
This is my form designer
[attachment=0]ScreenShot.png[/attachment]
[attachment=1]ScreenShot2.png[/attachment]
This is my form setup
[attachment=2]ScreenShot3.png[/attachment]
[attachment=3]ScreenShot4.png[/attachment]
I try to do anything with DB Read but I'm really not sure of this
[attachment=4]ScreenShot5.png[/attachment]
[attachment=5]ScreenShot6.png[/attachment]
Then this the "File Upload" action details
[attachment=6]ScreenShot7.png[/attachment]
[attachment=7]ScreenShot8.png[/attachment]
All field are saved but not patronymes[patro_fichier] and patronymes[user_id].
Thanks for help and sorry for my bad english.
In my form connect with CCv5, I have a file field who don't save value nor file in directory and I can't save user_id value also. I would user_id take current user id.
This is my form designer
[attachment=0]ScreenShot.png[/attachment]
[attachment=1]ScreenShot2.png[/attachment]
This is my form setup
[attachment=2]ScreenShot3.png[/attachment]
[attachment=3]ScreenShot4.png[/attachment]
I try to do anything with DB Read but I'm really not sure of this
[attachment=4]ScreenShot5.png[/attachment]
[attachment=5]ScreenShot6.png[/attachment]
Then this the "File Upload" action details
[attachment=6]ScreenShot7.png[/attachment]
[attachment=7]ScreenShot8.png[/attachment]
All field are saved but not patronymes[patro_fichier] and patronymes[user_id].
Thanks for help and sorry for my bad english.
Hi Veronique,
First, please make sure that you have the latest v5.0.3
Then the user_id should be saved to the table only if you use "db save" action, but since we use CC here, then you will have to add it to the $form->data array before the "Connection action".
The Files config in the "upload" action will need to be changed to this format:
Model.field_name
Regards,
Max
First, please make sure that you have the latest v5.0.3
Then the user_id should be saved to the table only if you use "db save" action, but since we use CC here, then you will have to add it to the $form->data array before the "Connection action".
The Files config in the "upload" action will need to be changed to this format:
Model.field_name
Regards,
Max
OK, I update ChronoForms to v5.0.3.
Tank you for answer.
If I well understand I must not use "db save" for save current user id because I use ChronoConnectivity. That's right ?
Then how add user_id value saving before "Connection action". I try to put Custom Code before with this :
but it don't save user_id in my table.
I change File config to
Could you please help me again.
Tank you for answer.
If I well understand I must not use "db save" for save current user id because I use ChronoConnectivity. That's right ?
Then how add user_id value saving before "Connection action". I try to put Custom Code before with this :
<?php
$user = JFactory::getUser();
return array("user_id")=>$user->get("id");
?>
but it don't save user_id in my table.
I change File config to
patronymes.patronymes[patro_fichier]:zip-doc-pdf-xls-rar-odt-ods-xlsx-docx-rtf-txt-jpg
where "patronymes" is model name (in CC) and patronymes[patro_fichier] is the filed name in Designer tab of ChronoForms. Nothing happen.
Could you please help me again.
Hi veronique,
I'm not clear about the file uploads, Max will need to answer that question.
The code you have for the user id is broken it won't do anything useful that I can see. It looks as though you have found some code to use the User_id to select a record in a DB Read. But it's not quite correct for that either.
Please try
Bob
I'm not clear about the file uploads, Max will need to answer that question.
The code you have for the user id is broken it won't do anything useful that I can see. It looks as though you have found some code to use the User_id to select a record in a DB Read. But it's not quite correct for that either.
Please try
<?php
$user = JFactory::getUser();
$form->data['patronymes']['user_id'] = $user->id;
?>
Bob
Hi GreyHead,
Your code make good. Current user id it's now save in my table.
I wait for solution for file upload fonctions.
Thanks a lot.
Your code make good. Current user id it's now save in my table.
I wait for solution for file upload fonctions.
Thanks a lot.
Hi Veronique,
The File's config box should use this syntax:
which is the model.field
Regards,
Max
The File's config box should use this syntax:
patronymes.patro_fichier
which is the model.field
Regards,
Max
Hi Max,
Thanks for précisions. Neither the file nor the value are registred despite this syntax correction.
That is my parameters :
[attachment=0]ScreenShot.png[/attachment]
Any other issue ?
Thanks for précisions. Neither the file nor the value are registred despite this syntax correction.
That is my parameters :
[attachment=0]ScreenShot.png[/attachment]
Any other issue ?
Hi Veronique,
Bug found, please send me a message using the contact us page to get a patch file for this to work.
Regards,
Max
Bug found, please send me a message using the contact us page to get a patch file for this to work.
Regards,
Max
Hi Veronique,
Please change the field name in the "Files config" box to include the Model id ONLY, then include the model id in the "Arrays fields names" in the upload action settings!
Regards,
Max
Please change the field name in the "Files config" box to include the Model id ONLY, then include the model id in the "Arrays fields names" in the upload action settings!
Regards,
Max
Like that ?
"File config" : patronymes
"Array field" : patronymes
Véronique.
"File config" : patronymes
"Array field" : patronymes
Véronique.
In the fields config you will use "patronymes" as the field name, instead of "patronymes.patro_fichier"
Regards,
Max
Regards,
Max
Max,
Despite your advices, no value, no file
My file field in form :
[attachment=1]ScreenShot.png[/attachment]
File upload action properties :
[attachment=0]ScreenShot2.png[/attachment]
[attachment=2]ScreenShot3.png[/attachment]
Sorry 😶
Veronique.
Despite your advices, no value, no file
My file field in form :
[attachment=1]ScreenShot.png[/attachment]
File upload action properties :
[attachment=0]ScreenShot2.png[/attachment]
[attachment=2]ScreenShot3.png[/attachment]
Sorry 😶
Veronique.
Hi Veronique,
In the fields config box:
patronymes:jpg-png...eyc
In the array fields:
patronymes
Regards,
Max
In the fields config box:
patronymes:jpg-png...eyc
In the array fields:
patronymes
Regards,
Max
Hi Veronique,
screenshot for the new config please ?
Regards,
Max
screenshot for the new config please ?
Regards,
Max
Also please make a form copy, remove the "Connection action" and test the form, does the file upload work ? if not then please send me a backup file for the form, either here or using the contact ticket!
Regards,
Max
Regards,
Max
Hi Max,
I remove "Connection action" and this don't make upload work.
I send you backup file.
Thanks a lot
Véronique.
I remove "Connection action" and this don't make upload work.
I send you backup file.
Thanks a lot
Véronique.
Hi Max,
My form works with CF v5.0.4 (it upload file and save its name in data base) but on submit I get a blank page instead of the ChronoConnectivity list.
Any idea ?
Thanks
My form works with CF v5.0.4 (it upload file and save its name in data base) but on submit I get a blank page instead of the ChronoConnectivity list.
Any idea ?
Thanks
Hi GreyHead,
Thank you for your advice, I turned Joomla debug mode but the page remains completely blank so I try to resolve this disfunction like blind😃
Véronique
Thank you for your advice, I turned Joomla debug mode but the page remains completely blank so I try to resolve this disfunction like blind😃
Véronique
Hi Véronique,
Its not the Joomla debug which should be turned on, but the "Error reporting" should be set to "Maximum", that should display some error information to help understand why the blank page occurs.
Regards,
Max
Its not the Joomla debug which should be turned on, but the "Error reporting" should be set to "Maximum", that should display some error information to help understand why the blank page occurs.
Regards,
Max
Has anyone managed to get this to work?
Just wondering would it be easier just to add a manual link to the form and call using db read? or is a fix available?
Just wondering would it be easier just to add a manual link to the form and call using db read? or is a fix available?
Does this problem, by chance, has been solved in some way?
Because it's the same that I have, as explained at the end of this topic (which I haven't yet received a reply): empty database column in CFv5 only with file upload (and consequently, no connection with CCv5).
http://www.chronoengine.com/forums/posts/f12/t98771/adding-a-download-button-or-link-in-action-view.html
Because it's the same that I have, as explained at the end of this topic (which I haven't yet received a reply): empty database column in CFv5 only with file upload (and consequently, no connection with CCv5).
http://www.chronoengine.com/forums/posts/f12/t98771/adding-a-download-button-or-link-in-action-view.html
After a long and daily search on the forum, at the end I solved the problem by reading this topic:
http://www.chronoengine.com/forums/posts/t98522/p341583/image-upload-and-chronoconnectivity.html#p341583
And in particular this very useful custom code of great Max:
In my opinion, you should add this it in the FAQ, because I noticed that the "file upload action" is one of the most difficult to save in a DB with CF and solutions are not easy to find ...
http://www.chronoengine.com/forums/posts/t98522/p341583/image-upload-and-chronoconnectivity.html#p341583
And in particular this very useful custom code of great Max:
<?php
if($form->data("file")){
$form->data["Model"]["field"] = $form->data["file"];
}
In my opinion, you should add this it in the FAQ, because I noticed that the "file upload action" is one of the most difficult to save in a DB with CF and solutions are not easy to find ...
This topic is locked and no more replies can be posted.