1

Topic: Form seems to ignore occAttr:n cutomisation

I have two occurrence attributes defined, occAttr:3 and occAttr:4 an I would like to make these data persistent over sample inputs, after page reloads.  My User Interface->Form structure looks like this:

=Species=
?Please enter the species you saw and any other information about them.?
[species]
@resizeWidth=1500
@resizeHeight=1500
[species attributes]
[*]
@occAttr:4|lockable=true
@occAttr:3|lockable=true
=Place=
?Please provide the spatial reference of the record. You can enter the reference directly, or search for a place then click on the map to set it.?
[spatial reference]
@lockable=true
[place search]
[map]
[*]
@scroll_wheel_zoom=false
@clickedSrefPrecisionMin=6
=Other Information=
?Please provide the following additional information.?
[date]
@lockable=true
[sample comment]
@lockable=true
[*]
@smpAttr:3|lockable=true
=*=

The "smpAttr:3|lockable=true" works as expected along with all the other lockables but the "occAttr:n" values are ignored.  If I use the alternate code:

[occAttr:3]
@lockable=true

I get this error "The form structure includes a control called [occAttr:3] which is not recognised."  This format works fine with smpAttr:n values.

Refs:
https://code.google.com/p/indicia/wiki/ … rkedRecord
https://indicia-docs.readthedocs.org/en … ht=occAttr
http://gis.westwalesbiodiversity.org.uk … ?q=node/11

Regards
Mike Evans

2

Re: Form seems to ignore occAttr:n cutomisation

Hi Mike,

If you try something I frequently use like

[occAttr:3]
@label=foo

is that applied correctly to your attribute or do you still get the not recognised error?

If you still get the not recognised error then make sure you have cleared the iForm cache and try again.

Jim Bacon.

3

Re: Form seems to ignore occAttr:n cutomisation

Hi Jim

Using your example I still get the same error:

The form structure includes a control called [occAttr:4] which is not recognised.

Clearing the indicia cache in iform->Setting->IformAdminTasks makes no difference.

Below a copy/paste from the page source view showing the attribute in the form

<label for="occAttr:3">Abundance:</label>
<input type="text" id="occAttr:3" name="occAttr:3" class=" "   value=""   />
<br/>

4

Re: Form seems to ignore occAttr:n cutomisation

Pity, I was hoping for something simple.
Am I right in thinking you are using your own warehouse for this?

The next question is what version of the iForm module are you using?

Jim.

5

Re: Form seems to ignore occAttr:n cutomisation

I was hoping for something simple too. :)

Yes it is our own warehouse and were usinginstant-indicia-0.8.2.zip and indicia-0.8.1b.zip for the Warehouse.

https://code.google.com/p/indicia/downloads/list

6

Re: Form seems to ignore occAttr:n cutomisation

Well, I am not sure if I am the bearer of good or bad news but the way forward is to upgrade your code from the repository using a subversion client.

The warehouse you could possibly leave alone although there is a 0.8.2 branch with numerous bug fixes compared to your installed version. We are now using the 0.9.0 rc1 branch which contains many new features and is the version that we are currently maintaining.

However, it is the iForm module that really needs updating. The only choice here is to use the development version and, although you might feel twitchy about the fact that this is code that is changing daily, it really is a better choice than the version you have installed. There have been numerous fixes since the version that you have and they all went in to the development trunk. An upgrade will either fix your problem or, if not, we will then be using the same code and we will be able to replicate and fix your problem. A version controlled release of the module is coming soon.

Jim

7

Re: Form seems to ignore occAttr:n cutomisation

Thanks Jim.

I've been monitoring the development progress.

I think I'll advise that we wait until the next stable release is out an that case.  I've implemented most of what is required with the existing code and the remainder isn't critical.

Many thanks for you help, regards.  Mike Evans

8

Re: Form seems to ignore occAttr:n cutomisation

Hi Mike
I think Jim is right that an upgrade will be useful for you, and that the 0.9 rc1 branch is pretty much stable for the warehouse (and just waiting for me to find the time to package it as a release).
However, I did notice that your code looks like:

[species attributes]
[*]
@occAttr:4|lockable=true
@occAttr:3|lockable=true

This won't work even in new code, because the 1st line outputs species attributes (i.e. occurrence attributes), the 2nd line then outputs any sample attributes that have been dynamically configured for this tab and therefore the config in the 3rd and 4th line is only sent to the preceding line for sample attributes, not the first line. I.e. your code should really be:

[species attributes]
@occAttr:4|lockable=true
@occAttr:3|lockable=true
[*]
John van Breda
Biodiverse IT

9

Re: Form seems to ignore occAttr:n cutomisation

Thank you John.  That worked just fine.  The documentation seems to imply otherwise though.  Or I mis-read it.

I will look into the 0.9 branch now that it's stable.

Thanks again

MIke Evans.