Make photo optional in Crowdsource app

1024
1
Jump to solution
04-08-2017 09:13 PM
RohanKhadilkar
New Contributor

In my form, I want few fields to be optional and hence changed their JSON in the Online assistant to "required": false. I did this for the photo as well, but that doesn't allow me to click on the accept terms and submit button. Is photo mandatory? Any workaround for this?

0 Kudos
1 Solution

Accepted Solutions
StephenSylvia
Esri Regular Contributor

We have not added this ability in the beta version of the Crowdsource app so unfortunately you will not be able to do this with the hosted version of the code. If you have a JavaScript developer who is familiar with React and a server to host a customized version of the app, you can download the code and make the necessary changes. First, you will need to modify how the contribute form checks if it is valid: storymap-crowdsource/CrowdsourceForm.babel.js at master · Esri/storymap-crowdsource · GitHub . Also, you will need to determine what to do if no photo is provided. If the square in the gallery remains blanks, viewers may think your app is broken. You should consider uses a fallback image or handle it in a different way. 

View solution in original post

0 Kudos
1 Reply
StephenSylvia
Esri Regular Contributor

We have not added this ability in the beta version of the Crowdsource app so unfortunately you will not be able to do this with the hosted version of the code. If you have a JavaScript developer who is familiar with React and a server to host a customized version of the app, you can download the code and make the necessary changes. First, you will need to modify how the contribute form checks if it is valid: storymap-crowdsource/CrowdsourceForm.babel.js at master · Esri/storymap-crowdsource · GitHub . Also, you will need to determine what to do if no photo is provided. If the square in the gallery remains blanks, viewers may think your app is broken. You should consider uses a fallback image or handle it in a different way. 

0 Kudos