Constraint and retrictions

Morning guys,

I have questions, I want to restrict a text box such that name will only allow characters and also prevent the image option the ability to choose image from the device but only capture option.

My ODK has become slow and its taking more time to load after including a lot of cascading select of many entries. what is the solution to this.

Thanks in advance.

Hi @Snvssh4a2017
If you want to restrict your text box you can use cosntarint + regex, here is an example form:
constraintExample.xml (1.1 KB)

unfortunately it's not possible to hide "choose image" button in ImageWidget but if you really need that I think we can add a new appearance for ImageWidget eg. "take-only" or something like that (to allow hiding that button).

Regards,
Grzegorz

2 Likes

As to the cascading selects being slow, external selects can load thousands of selects very very quickly. Give that a try!

Nice one, due to large data collection am trying to avoid data collectors from taking few pictures and then using the same images for different questions.

The regex attribute has actually worked well, thanks a lot

Thanks yanokwa, i appriciate let me see how that works now...

This feature (removing the SELECT FROM GALLERY button for image selection) is heavily required by me, and I am sure by so many others too. Where do I +1 it?

Please write it up briefly in the Features category! Hopefully it will be as simple as saying that it's like the selfie widget but with a different appearance name (rear-facing?). You can try out the selfie widget in the All widgets form that's first in Get Blank Form when you have the default Aggregate server set (https://opendatakit.appspot.com).

Dear friends,

Can any one please explain how to add the external_select itemsets to your server such that it can be accessed via the phone when one downloads a form, i have set it but when i go to the phone to use the odk collect, it says that the itemsets is missing and it tells me it should be in the media folder.

regards

Nicholas

@Snvssh4a2017 Do you use Aggregate? If so you can add your form (Form definition (xml file)) and your csv file (Optional Media file(s)).

Yes thats what is did but its giving me an error

There is something wrong with your form. Could you attach it?

Not really thats the error when uploading it

yes I know then then form is parsed and you can see an error if there is something wrong.

Im wondering because i just transferred the choices sheet to external choices sheet and initially it was working well, but slow now it has that error, whats the way forward?

Morning team,
I succeeded in uploading my itemsets.csv file which contains my external choices. Im getting the following error,

Kindly assist

That means there is something wrong with your itemsets.csv. You should check column names carefully.

They appear to be exactly the same as the ones in the external choices and queries from the survey sheet. And i just transferred them from my choices sheet as they are.

I'm pretty sure there is something wrong you can attach your form, it's hard to say what's wrong if I can't see files.

@Snvssh4a2017 It was tricky but I got it :slight_smile: The problem is you use "-" in column name what is not allowed in 1.8.1 version. It was hard to track because everything works well on our current master branch as it's already fixed. So now when you use 1.8.1 you should remove all "-" from column names.

2 Likes

This solves the problem, thanks alot Grzegorz, You have been of great help

1 Like