Conditional file upload button

QuestionsConditional file upload button
Alexander Toth asked 5 years ago

Hello,
I’ve a grid with the file upload:

$col = array();
$col[“title”] = “File”;
$col[“name”] = “file”;
$col[“editable”] = true;
$col[“edittype”] = “file”;
$col[“upload_dir”] = “../../../sistemaASAweb/docs”;
$col[“show”] = array(“add”=>false, “edit”=>true);
$cols[] = $col;

I need that the upload button in the edit form should be visible only if a field in the same record has a specific value. How is possible to do this?

Thanks

1 Answers
Abu Ghufran Staff answered 5 years ago

Similar demo is available here, It shows total and date field only when checkbox field is checked.

https://gist.github.com/59f21c298baddf3f97cebff84e99f34c (line 35, 145)

You can replace line 35 with your desired JS code logic.

Let me know if you need further help.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

9 + 11 =

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?