Conditional file upload button

QuestionsConditional file upload button
Alexander Toth asked 3 weeks 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 3 weeks 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
PHP Grid Framework
 
Your Answer

13 + 20 =

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 / 5. Vote count:

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

Let us improve this post!