Hi,
I have followed your topic about editing an image in CF. Works great from my CC main table.
Now I have another CC with one to many joined table. So here I have to modify my form, adding the name of my MODEL_ID before each name of field as it is recommended. This works great for normals fields like i.e. 'Name' wich is now 'ModelId[name]'...
Strangely it is absolutely impossible to make it work for my image upload. I can display the image in my form (don't forget : it is an editing form :-)), I can erase this image, but I can't upload another one.
That's the code in my form, the div concerned by the upload :
In the value for the "ghost", I tried some combination ('AccueilMembre' is my MODEL_ID and 'eleve_portrait' the field name) :
[list]AccueilMembre[eleve_portrait]
{eleve_portrait}
{AccueilMembre.eleve_portrait}[/list]
That's the param in my event 'Upload Files' On Submit :
And that's all, i put no other params in that event...
When i check, nothing is registred in the Table, and there's no files uploaded in the folder...
Any suggestion to make this work ?
I have followed your topic about editing an image in CF. Works great from my CC main table.
Now I have another CC with one to many joined table. So here I have to modify my form, adding the name of my MODEL_ID before each name of field as it is recommended. This works great for normals fields like i.e. 'Name' wich is now 'ModelId[name]'...
Strangely it is absolutely impossible to make it work for my image upload. I can display the image in my form (don't forget : it is an editing form :-)), I can erase this image, but I can't upload another one.
That's the code in my form, the div concerned by the upload :
<div class="ccms_form_element cfdiv_file" id="eleve_portrait1_container_div" style="">
<label>Nouveau portrait</label>
<input type="hidden" name="AccueilMembre[eleve_portrait]" value="{eleve_portrait}" alt="ghost" />
<input class="" title="" type="file" name="AccueilMembre[eleve_portrait]" />
<div class="clear">
</div>
<div id="error-message-eleve_portrait">
</div>
</div>
In the value for the "ghost", I tried some combination ('AccueilMembre' is my MODEL_ID and 'eleve_portrait' the field name) :
[list]AccueilMembre[eleve_portrait]
{eleve_portrait}
{AccueilMembre.eleve_portrait}[/list]
That's the param in my event 'Upload Files' On Submit :
Fields Configuration : AccueilMembre[eleve_portrait]:jpg-jpeg-gif-png
Max Size in KB : 300
And that's all, i put no other params in that event...
When i check, nothing is registred in the Table, and there's no files uploaded in the folder...
Any suggestion to make this work ?