This topic is locked
[SOLVED]

 Disable Upload Button

2/3/2013 11:55:14 PM
PHPRunner General questions
J
jackolantern author

how to disable upload button? or how to make sure just one file uploaded at one time.

because upload button have tendencies can upload many file even if limit file has been setup to 1 file.

But when am check at the server there many file corresponding to 1 record, or in case record has been canceled but file still exist in server.

how to prevent this?

Sergey Kornilov admin 2/4/2013

If you limit the number of files to be uploaded by one - you won't be able to add and upload more than one file.

J
jackolantern author 2/13/2013



If you limit the number of files to be uploaded by one - you won't be able to add and upload more than one file.


The problem is when user do this scenario:

  1. user add record,
  2. user upload file,
  3. user canceled add by not save the record
    The file will exist in server and not deleted automaticaly, so i want to disable the upload button.

    So user can upload only by saving the record, if not save the record the file will not uploaded.

S
safesurf 2/15/2013



The problem is when user do this scenario:

  1. user add record,
  2. user upload file,
  3. user canceled add by not save the record
    The file will exist in server and not deleted automaticaly, so i want to disable the upload button.

    So user can upload only by saving the record, if not save the record the file will not uploaded.


I have same problem when a user in Edit form uploads a file. The database entry will only appear for file if save is pressed on record. I would like to remove the upload button but keep the add button. The user will then have to do a save to upload file.

J
jackolantern author 2/25/2013



I have same problem when a user in Edit form uploads a file. The database entry will only appear for file if save is pressed on record. I would like to remove the upload button but keep the add button. The user will then have to do a save to upload file.


Yup, i forget thats is another problem.

So i think its better idea to delete this upload button.

But how to do it?

Sergey Kornilov admin 2/26/2013

You need to modify C:\Program Files\PHPRunner6.2\source\classes\controls\FileField.php file removing the following code section:



<SPAN class="btn btn-primary start">

<SPAN class="runner-btnframe">

<SPAN class="runner-btnleft"></SPAN>

<SPAN class="runner-btnright"></SPAN>

<A class="runner-button" href="#" >'

.##message START_UPLOAD##

.'</A>

</SPAN>

</SPAN>
S
safesurf 2/28/2013



You need to modify C:\Program Files\PHPRunner6.2\source\classes\controls\FileField.php file removing the following code section:



<SPAN class="btn btn-primary start">

<SPAN class="runner-btnframe">

<SPAN class="runner-btnleft"></SPAN>

<SPAN class="runner-btnright"></SPAN>

<A class="runner-button" href="#" >'

.##message START_UPLOAD##

.'</A>

</SPAN>

</SPAN>



The upload button is now gone. How do you disable the upload link next to filename on edit page?

I think it is working ok if you select upload before save.

J
jackolantern author 3/4/2013



The upload button is now gone. How do you disable the upload link next to filename on edit page?

I think it is working ok if you select upload before save.


i have similiar problem when saving record, save button or link not working and record or file not saved.

Unless i press the link/button upload. How to make save button working again both in inline or edit mode.