Hi,
now I'm a little further with my form.
With this custom code that uploads the CF5 Form Photo is displayed to me in my edit form:
<?php
if (isset($form->data ['Resume'] ['foto']) && $form->data ['Resume'] ['foto']) {
echo "<img src='/components/com_chronoforms5/chronoforms/uploads/Bewerbungen/{$form->data['Resume'] ['foto']}' style='max-width:200px' />";
} else {
echo "<img src='".JURI::root()."components/com_chronoforms5/chronoforms/uploads/Bewerbungen/no_image.jpg' style='max-width:150px' />";
}
?>
So I can delete or replace the picture, I have created a checkbox group.
Field Name: delete_image
Option: delete =Löschen
Enable ghost: Yes
Ghost value: Löschen
In Setup ein Custom Code:
<?php
if ( isset($form->data['delete_image']) && $form->data['delete_image'] == 'Löschen' ) {
$form->data[Resume]['foto'] = '';
}
?>
The status is:
I can delete the image in my Edit form. After deleting is my "no_image.jpg" appears.
That is correct
To upload a new image that "no_image.jpg" replaced again, I have in a Designer "FileUpload field"
Field Name: Resume [foto]
Unfortunately, this does not. Probably because the Edit form on CC5 runs.
Text fields can be changed already. Only the picture I can not change.
Do I have to have a Custom Code Register?
LG
F.