Disabling Choose Image Option in Forms without diving into ODK Collect code

Hi ODK Devs,

I know that removing/disabling "Choose Image" option has been discussed in
here:

https://code.google.com/p/opendatakit/issues/detail?id=892

and

https://groups.google.com/forum/#!topic/formhub-users/KWXQ81xbqbM

I wanted to know if there has been any progress on that, is there a way to
disable it, since these posts are many months old now.

Regards,
Ayub

Ayub,

As Mitch said in the bug report, "The core team does not have time to make
this small change at this time."

Patches are welcome.

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Thu, Mar 6, 2014 at 11:47 AM, Ayub nrspaggregate@gmail.com wrote:

Hi ODK Devs,

I know that removing/disabling "Choose Image" option has been discussed in
here:

https://code.google.com/p/opendatakit/issues/detail?id=892

and

https://groups.google.com/forum/#!topic/formhub-users/KWXQ81xbqbM

I wanted to know if there has been any progress on that, is there a way to
disable it, since these posts are many months old now.

Regards,
Ayub

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks Yaw,

I'll wait till some property/tag (mediatype="image-no-choose/*") is
assigned to Upload tag :slight_smile:

Can you give me pointers about how can i contribute patches to ODK.

Regards,
Ayub

Ayub,

Fork the code. Do the development in a branch. Submit a feature
request with a link to the repo (or attach a patch). The core team can
then patch it when they have time.

Yaw

ยทยทยท -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Fri, Mar 7, 2014 at 12:36 AM, Ayub nrspaggregate@gmail.com wrote:

Thanks Yaw,

I'll wait till some property/tag (mediatype="image-no-choose/*") is assigned
to Upload tag :slight_smile:

Can you give me pointers about how can i contribute patches to ODK.

Regards,
Ayub

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I guess i would have to look into GIT Hub first for that.

Thanks

Dear Ayub and Yaw,

Do either of you know if there now exists an option disable the 'Choose Image' feature in ODK?

Thanks,
Lizzy

ยทยทยท On Monday, 24 March 2014 13:19:21 UTC+2, Ayub wrote: > I guess i would have to look into GIT Hub first for that. > > > Thanks

If the prompt is read-only, it will disable both the Take Image and Choose
Image buttons.

But there is no way to disable just one or the other of those without
modifying the Java code.

If you do wish to make changes to support this, please propose appearance
setting(s) to control these on the xlsform.org site (the keepers of the
XLSForm spec).

If you get the blessings of the xlsform.org teams and have changes, please
also consider donating your changes back to the ODK codebase under the
Apache 2 license.

ยทยทยท On Mon, Nov 2, 2015 at 1:04 PM, wrote:

On Monday, 24 March 2014 13:19:21 UTC+2, Ayub wrote:

I guess i would have to look into GIT Hub first for that.

Thanks

Dear Ayub and Yaw,

Do either of you know if there now exists an option disable the 'Choose
Image' feature in ODK?

Thanks,
Lizzy

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

I had to finally dive into ODK Collect code back then since there wasn't
any other solution around.

So here you can do it:

In the Collect Source:

src->org.odk.collect.android.widgets->ImageWidget.java

you can change one line:

mChooseButton.setEnabled(!prompt.isReadOnly());

to:

mChooseButton.setEnabled(false);

Hope this helps.

We support both options because some camera apps do not return the chosen
image to ODK Collect -- the user needs to take an image, then go back an
choose the image they took. This is something that varies across device
manufacturers and models.

ยทยทยท On Mon, Nov 2, 2015 at 3:13 PM, Mitch Sundt wrote:

If the prompt is read-only, it will disable both the Take Image and Choose
Image buttons.

But there is no way to disable just one or the other of those without
modifying the Java code.

If you do wish to make changes to support this, please propose appearance
setting(s) to control these on the xlsform.org site (the keepers of the
XLSForm spec).

If you get the blessings of the xlsform.org teams and have changes,
please also consider donating your changes back to the ODK codebase under
the Apache 2 license.

On Mon, Nov 2, 2015 at 1:04 PM, lizzybutton@gmail.com wrote:

On Monday, 24 March 2014 13:19:21 UTC+2, Ayub wrote:

I guess i would have to look into GIT Hub first for that.

Thanks

Dear Ayub and Yaw,

Do either of you know if there now exists an option disable the 'Choose
Image' feature in ODK?

Thanks,
Lizzy

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

ODKers,

I am working on an ODK form that needs the "Choose Image" option disabled. This conversation took place a few years ago, was a solution found?

Paul Macharia

Use the new appearance.

https://docs.opendatakit.org/form-question-types/#image-widget-with-required-new-image

1 Like