File upload

QuestionsFile upload
Vincent asked 3 years ago

Hi !

I have a couple of questions regarding file upload, since i am not able to have it working as i think it should be.

1. I added a file field, mainly inspired by the demo file. I'm able to upload one or multiple files, and they are showing in view or list. BUT, when i go in edit mode, the only option i have is "Reset" and no option to delete. Reset simply reset this field to empty. Is this normal ?

2. When i click the edit button to the right, or when i double click (i added the function ondblclick…. editGridRow), the opened form does not include file upload. Field is present in the form, but hidden. However, when i select the line and use the top edit button, the upload field is present.

3. I tried renaming the file name in on_insert function and the file remains the same and isn't renamed.. why ?

Thanks for your help !

Vincent

1 Answers
Vincent answered 3 years ago

In my initial post, problem #2: I managed to fix the issue by adding this:

$grid["edit_options"]["beforeShowForm"] = "function(form){
$('#tr_fileupload',form).show();
$('#tr_files',form).remove();
}";

("fileupload" and "files" are the name of my fields)

Your Answer

15 + 13 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?