Field type "FILE" on cms_user custom fields

Ian Verschuren asked on October 30, 2015 17:05

Hello, I am trying to add a FILE field as a custom field for Users and I have not been able to do so. The Datatype FILE does not show as an option if I try to add it as a custom field for Users. However, if I try to add it to a regular page type, it shows normally. The reason behind this requirement, is because I need to add a file upload control ( I need the user to upload an image) and such form control option is not present with datatypes "TEXT". Only Media selection, file selection and image selection form controls are available, and they are not an option, because they display all the navigation tree of the CMS to get the user to select a file. Can anyone tell me if I can enable the FILE datafield for CMS_users? Or, if there is a way to get the regular file uploader control as an option for form controls for CMS_Users? We are running kentico 8.2.0.

Thanks a lot in advance for your time!

Recent Answers


David te Kloese answered on October 31, 2015 00:55

Hi,

I think this could be enabled by making the control available for Text and for System tables here:

Open the module: Form controls and navigate to Upload file > General > Control scope

  • Use control for: check 'Text' (its the default type anyway)
  • Show control in: check 'System tables'

If this works I'd advise to revert your change, clone the original form control and make it specific for this purpose.

Greets,

David

0 votesVote for this answer Mark as a Correct answer

Ian Verschuren answered on November 2, 2015 15:56

Thanks, that got the form control to display!! However, now it is showing, but the information is not being saved (both deletion and upload of the new file). No errors on event log. Do you have any idea of why this might be happening?

Do you know where these event handlers might be implemented? (so I can try to debug/troubleshoot where ist hat it is failing)

        uploader.OnUploadFile += Form.RaiseOnUploadFile;
        uploader.OnDeleteFile += Form.RaiseOnDeleteFile;

Thanks!!

0 votesVote for this answer Mark as a Correct answer

Ian Verschuren answered on November 4, 2015 19:25

Anything guys?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.