Hi,
We have installed primero in our system and started using it.
We have created some of the custom forms and we want file upload field to be added in that.
How can we achieve the same?
Hi,
We have installed primero in our system and started using it.
We have created some of the custom forms and we want file upload field to be added in that.
How can we achieve the same?
Anything to do with file attachments has to be done through JSON. (export the configuration bundle using the UI) However, we may have done some hardcoding, so there is a high risk of issues if you put file attachments on any other form besides the current ones
I have created many custom form and each form should have a field for file upload. Please if it possible for you to explain with proper details how to add file upload field in each form.
First export a configuration bundle. To do that look at the docs here https://support.primero.org/books/primeroIMS/PrimeroConfigurationProcessGuide/master/PrimeroConfigurationProcessGuide.html#configure. Inside you will find something which looks like this for upload fields.
“fields”: [
{
“visible”: true,
“mobile_visible”: true,
“highlight_information”: {
“highlighted”: false
},
“multi_select”: false,
“required”: false,
“show_on_minify_form”: false,
“hidden_text_field”: false,
“autosum_total”: false,
“autosum_group”: “”,
“create_property”: true,
“hide_on_view_page”: false,
“name”: “upload_bia_document”,
“type”: “document_upload_box”,
“editable”: false,
“disabled”: true,
“display_name_en”: “BIA Document”,
“display_name_fr”: “BIA Document”,
“display_name_ar”: “BIA Document”,
“display_name_es”: “BIA Document”,
“base_language”: “en”
}
On your custom forms you need to make something like this for an upload field.
As per above suggestion, I am able to create upload field in form.
Uploaded file is accessible in edit section, but in view section of the form, I am not able to view the uploaded file.
As its a BIA Document type I request for approval even after approving the document the red Exclamation sign doesn’t go and still, I was unable to see my document
Is there any way to access/view uploaded file in the view section?
Awaiting reply on the same.
Thanks.
This is probably related to permissions. What permissions does the role have to view?
Can you please suggest what permission it should have to view the document uploaded?
The role needs to have the view permission.Note that:
To edit the properties of an existing role, find the name and click Edit in the options in the right column. From the Show page, click the EDIT button at the top of the screen… Click on the SAVE button once all the desired information has been changed or entered.
A few hints for setting roles: