1

Topic: iForm configuration questions

Hi everyone,

I have just setup a new drupal 7 install with the iForm module for a website called the solitary bee project, but am having some configuration issues.  The map and form work ok, but I need to be able to do the following.  I wander if anyone has any tips on this.  I have not worked with indicia for a few years so am very rusty.

1.  I have a dropdown list with a ‘something else’ option, could I have a comment box pop up only when this option from the dropdown list is selected to allow the participant to specify details
2.  How do I insert sample images into my form to give users examples.  If I use normal img src code, it generates extra code and doesnt work
3.  I have 4 types of bee that people can select, but want them only to be able to select 1 from the radio box list.  How is this done?

Thanks again guys for your help.

Best wishes,

Mark

2

Re: iForm configuration questions

Hello Marc

Thanks for posting your queries here.

1. For this you can create node.2.js file and stored into your iform\client_helpers\prebuilt_forms\js folder  and write some jquery code. you should have knowledge of jquery language.

2. You could add sample images to your indicia's iform body text and use full html text format of the body text.

3. In the Species settings, select "Only allow entry of one occurrence at a time" and Select option "Radio group" from Single species selection control type.  I done this for you.

Biren

Biren Rathod
BRC Web Developer

3

Re: iForm configuration questions

Hi Biren,

Thank you for your answers.  Numbers 1 and 3 are great, for number 2, the issue is that I would like the images to be above the relevant dropdown list, rather than at the top of the page.  Is this possible?

Best wishes,

Mark

4

Re: iForm configuration questions

Hello Mark

You could put your html code in the "Form structure" of User interface something like this <img src="/sites/default/files/images/imagename.jpg" width="361" height="106">


Biren

Biren Rathod
BRC Web Developer

5

Re: iForm configuration questions

Also, forgot to mention in above post, please put your html code between page break tag <br>...</br> .

Biren Rathod
BRC Web Developer

6

Re: iForm configuration questions

Thanks Biren,

That all worked fine :-)

One final question.  The order of my species does not reflect the order in my indeicia warehouse.  The last 2 species in my list should come before the first 2.  I can't seem to find an option however for changing the order.  How do I do this?

Thanks again.

Mark

7

Re: iForm configuration questions

You could do by adding number for sort order of the species list on the warehouse.

Biren Rathod
BRC Web Developer

8

Re: iForm configuration questions

Hi Biren,

I added a sort number.  1-4, but the order hasn't changed in my form.  Do I need to do anything else to make the setting propogate?

Mark

9

Re: iForm configuration questions

Hi Biren,

Any ideas why the sort order hasn't worked for this?  I tried clearing the cache, but that didn't help.

Mark

10

Re: iForm configuration questions

Hello Marc

I have added the extraparam in the form structure to order the species name.

Biren

Biren Rathod
BRC Web Developer

11

Re: iForm configuration questions

Hello Marc

I also noticed that you have used html code for nest, shady, slopped and ground data. This data will not stored in the Indicia warehouse when people submit the survey. I would rather prefer to create attributes in the indicia warehouse. Also just to let you know that indicia support the data to display as combo box or dropdown list.

Biren

Biren Rathod
BRC Web Developer

12 (edited by msd135 16-03-2017 10:25:51)

Re: iForm configuration questions

Hi Biren,

Could you please provide more details on creating the attributes that you suggested so that the data can be stored in the warehouse and how to then add them to the form.

Mark

13

Re: iForm configuration questions

Hello Marc

All these attributes (like  nest, shady, slopped and ground data) are samples attributes, So you can create there and assigned those to your survey. Also, please if any of these already existed. if it is then you just need to assigned to your survey.

Biren

Biren Rathod
BRC Web Developer

14

Re: iForm configuration questions

Hi Biren,

Thank you for that, but I still don't quite understand the details.  I would be grateful if you could perhaps create one example so that I know how to perform the process or provide an exact breakdown of the required steps on the warehouse and in the iform module.  I I have just created a nest attribute on my test warehouse area.  Could you please check to see if it is correct and will provide the same functionality as what already exists on my iform?  Could you also please let me know how to add it to my iform so that it provides the same functionality as the existing nest option?

Thanks

Mark

15

Re: iForm configuration questions

Hello Marc

I have setup the example for nests.
1. check term -> Nests
2. check sample attributes -> The Solitary Bee Project (ARU) -> Bee survey    ->Nests
3. check survey -> The Solitary Bee Project (ARU) ->Bee survey
4. check "Form structure" in your indicia from on the Solitary Bee website.

Biren

Biren Rathod
BRC Web Developer

16

Re: iForm configuration questions

Thanks Biren,

I will now try that with the remaining options.  I also require to change the order of the species.  I have changed the sort order in the warehouse, but you didn't explain to me what you did last time on the iform to implement the changes when you did this?

Mark

17

Re: iForm configuration questions

Hello Mark

I thought you will get an idea easily by looking at the configuration. if not I added these lines

@smpAttr:838|default=14488
@smpAttr:838|label=How many nests were there?

Biren

Biren Rathod
BRC Web Developer

18

Re: iForm configuration questions

Hi Biren,

I understand, but must just say that I am still relatively new to this technology.  I have created the various attributes in the indicia warehouse and I then tried adding the below to my iform, but the options don't display so I reverted back to the initial settings.  Could you please comment on my settings below?  Is there an error in them? 

Note that after the [*] sign I had to add the [/*] setting as the forum would not let me submit this response without that code:

Also, it was the initial species order that I also wanted to change to the order that I have set in sort order, but that doesn't seem to work either.

=Species=
?Please enter the species you saw and any other information about them.  If you see more than one species in the aggregation please submit each separately.?
<img src="/sites/default/files/pictures/species.jpg">
[species]
@resizeWidth=1500
@resizeHeight=1500
@orderBy=true
@extraParams={"preferred":"true","orderby":"original"}
[species attributes]
[*][/*]
@smpAttr:838|default=14488
@smpAttr:838|label=How many nests were there?
[*][/*]
@smpAttr:839|default=14506
@smpAttr:839|label=How shady was the aggregation?
[*][/*] <br>
<img src="/sites/default/files/pictures/Bee5.png"></img><img src="/sites/default/files/pictures/Bee6.png"></img><img src="/sites/default/files/pictures/Bee7.png">
<br><br>
[*][/*]
@smpAttr:840|default=14505
@smpAttr:840|label=How sloped was the ground the aggregation was on?
[*][/*]<br>
If the nests aren’t on flat (blue crosses) or vertical (red crosses) ground, then we consider the ground sloped (orange crosses).<br><br>
[*][/*]
@smpAttr:841|default=14503
@smpAttr:841|label=Was most of the ground:
[sample comment]
[*][/*]
=When did you see it?=
?Please enter the date you surveyed the aggregation.?
[date]
[*][/*]
=Where did you see it? =
?Please provide the spatial reference of the record <strong>within 10 m</strong> (8 figure Grid ref: e.g. TL46165821 – this requires maximum zoom in the map). You can enter the reference directly, or search for a place then click on the map to set it.?
[spatial reference]
[place search]
[map]
@helpToPickPrecisionMin=100
@helpToPickPrecisionMax=10
@helpToPickPrecisionSwitchAt=100
@helpDiv=map-help
@gridRefHint=true
=*=


Thanks again for your help :-)

Mark

19

Re: iForm configuration questions

Ok - I think I've almost worked it out.  Just that my images aren't quite displaying correctly.  I have an idea though.

Mark

20

Re: iForm configuration questions

Hi Biren,

Ok, this is not my area of expertise, but I spent the weekend trying to get this to work.  I believe I made all of the additions/changes to the warehouse.  I added aggregation, slope and ground to the system and wrote the below code. (except for closing the * that is only in the code because the forum will not let me submit this post without including it.  When I try it however, only nests display. 

Please could you check the system and let me know if I have done anything wrong?

Thanks

Mark

=Species=
?Please enter the species you saw and any other information about them.  If you see more than one species in the aggregation please submit each separately.?
<img src="/sites/default/files/pictures/species.jpg">
[species]
@resizeWidth=1500
@resizeHeight=1500
@orderBy=true
@extraParams={"preferred":"true","orderby":"original"}
[species attributes]
[*][/*]
@smpAttr:838|default=14488
@smpAttr:838|label=How many nests were there?
[*][/*]
@smpAttr:839|default=14506
@smpAttr:839|label=How shady was the aggregation?
<br>
<img src="/sites/default/files/pictures/Bee5.png"></img><img src="/sites/default/files/pictures/Bee6.png"></img><img src="/sites/default/files/pictures/Bee7.png">
<br>
[*][/*]
@smpAttr:841|default=14503
@smpAttr:841|label=How sloped was the ground the aggregation was on?
<br>
If the nests aren’t on flat (blue crosses) or vertical (red crosses) ground, then we consider the ground sloped (orange crosses).<br>
<img src="/sites/default/files/pictures/slope.jpg"><br>
[*][/*]
@smpAttr:840|default=14505
@smpAttr:840|label=Was most of the ground:
[sample comment]
[*][/*]
=When did you see it?=
?Please enter the date you surveyed the aggregation.?
[date]
[*][/*]
=Where did you see it? =
?Please provide the spatial reference of the record <strong>within 10 m</strong> (8 figure Grid ref: e.g. TL46165821 – this requires maximum zoom in the map). You can enter the reference directly, or search for a place then click on the map to set it.?
[spatial reference]
[place search]
[map]
@helpToPickPrecisionMin=100
@helpToPickPrecisionMax=10
@helpToPickPrecisionSwitchAt=100
@helpDiv=map-help
@gridRefHint=true
=*=

21

Re: iForm configuration questions

Hello Marc

I think you missed my third step from my above forum post which to configure the survey. I just done it for you and they are now appeared as expected.

Please add above settings in the "Form structure" of "User Interface" section.

Biren

Biren Rathod
BRC Web Developer

22

Re: iForm configuration questions

Hi Biren,

Thank you, that seems to work for displaying the dropdown lists, but my image code doesn't work (see previous code).  I can get the images to show below everything and have done so tempoaraily (duplicating the dropdown lists) but need the images to show following each dropdown option.

Also, the list of species is still not updating.  The sort order is correct in the warehouse, but displaying out of order on the site.  The bee options should be

Adrena fulva
Adrena cineraria
Helictus rubicundus
Colletes hederae

Thanks again for your help.

Mark

23

Re: iForm configuration questions

About species order

Add this line into your Form Structure.

@extraParams={"orderby":"sort_order"}

Biren

Biren Rathod
BRC Web Developer

24

Re: iForm configuration questions

Hi Biren,

I've added that code, and it changed the species order, but still doesn't match  y sort order.  I did clear the cache also.

Mark

25

Re: iForm configuration questions

Sorry Mark that was my mistake.

It should be id to use to order. I done it for you.

Biren

Biren Rathod
BRC Web Developer