Constraint and retrictions

odk-collect
form-design

#1

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.


(Grzegorz Orczykowski) #2

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


(Yaw Anokwa) #3

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


#4

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


#5

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


(Saad Omer) #6

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?


(Hélène Martin) #7

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).


#8

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


(Grzegorz Orczykowski) #9

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


#10

Yes thats what is did but its giving me an error


(Grzegorz Orczykowski) #11

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


#12

Not really thats the error when uploading it


(Grzegorz Orczykowski) #13

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


#14

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?


#15

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

Kindly assist


(Grzegorz Orczykowski) #16

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


#17

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.


(Grzegorz Orczykowski) #18

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.


(Grzegorz Orczykowski) #19

@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.


#20

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