1

Re: Green Lanes survey - sectioned transect form

John,

thanks for sorting the error issues.

I have started to set up the Green Lane survey form (sectioned transect).  The starter for 10 (without help text at the moment) is at:
http://www.nbis.org.uk/node/171/edit

The attributes are set up for the survey on the warehouse is at:
http://warehouse1.indicia.org.uk/index. … ype=sample

I basically want to replicate the pdf form I sent you, online.  I will email again in case you did not get or have deleted.  It is basically drawing the length of the green lane or sections thereof onto a map background (as per your butterfly transect e.g. you sent me a while back); then filling in various text boxes/selections (as per my attributes); then adding any species seen.

I currently have a starter transect form (as mentioned above), but I don't know how to set it up properly. When I save it in its current state it asks me to assign CMS user id to locations (or similar request).  I guess this is due to me not setting either that up in the warehouse or the 'transects editor settings' being wrong.  I know the 'site list page path' is wrong, as I don't know what is means, do I have to set up sites, as we really want people to find their Green Lanes on a map (as per species surveys).  In terms of the blocks, this is set up against the survey in the warehouse (as per above link), but I don't know if I can use [*] to represent all custom attributes (as per my normal species survey user interface form structure code), or whether I need to list the blocks one by one (would this be the name of the block in square brackets, such as: [Recorded by]?). Also where does the help text go in the code (in other forms I use ?text?).
To add species in, would it be easiest if I have a hyperlink in the blocks section or help text, to a separate species survey form (our best would be our 'wildlife on the map - 'all species survey''.......as this is the kind of thing this form is set up for) - rather than trying to integrate our species form code into this sectioned transect form?

I guess, if you think this form is not the best for what we want, I could set up a drupal webform (as I do for questionnaires on our website) and link to our 'all species survey' at the end.

Thanks in advance John - hope this is not too much hassle for you.

2

Re: Green Lanes survey - sectioned transect form

Hi Sam
The form requires you to create an attribute called CMS User ID for locations in the survey you are using, which lets it keep a list of the people that use the transect. I've done that for you and the form now loads.
BUT, the form is designed to run alongside another report form which lists the current user's transects, and lets you edit them etc. That's what the reference you did not understand relates to (Site list page path). This would normally be deployed by using the Instant Indicia setup process, but since that is not in use on your site one option would be for me to copy the settings across into a new report form?
Blocks are set up as normal for species surveys, except that in this case you are capturing Location attributes not species or sample attributes. So you could for example create a location attribute called "Recorded By" then allocate it to your survey on the survey's edit attributes link in the warehouse after selecting location attributes in the drop down at the top.
Regarding species input, this form is a site capture form not a record capture form, so you are either going to need to take a copy of the form and add the code for record capture (which may take a bit of effort) or as you suggest it may be easier to link to another form for now. There is already a sectioned transects input form though it is designed for inputting against a fairly short species list.

John van Breda
Biodiverse IT

3 (edited by samneal 14-03-2012 16:24:03)

Re: Green Lanes survey - sectioned transect form

Thanks for setting up the CMS user ID John.
Yes if you could do the copying of settings into a new form, that would be really helpful.

I have set up the blocks.  I have the following questions regarding this and the form in its current state:

1.  The map does not appear in IE, I will email you the error.
2.   I can't seem to add the help text as I have in the species forms (using this format: ?text?) - I don't need to add any at the moment (but in case)....I guess as it is not blocks it needs to go somewhere other than this part of the form.  I guess I could just add extra text in the page intro section, as I have done with the intro and species survey link; so this is not a major one.
3.   I can't seem to get the form to allow input of multiple values, this is needed on the questions where I have used radio groups for the attributes - this is despite ticking the multiple value input box in each custom attribute in the warehouse. E.g. boundary features may be banks, hedges and ditches. Also when I use radio groups, rather than drop-downs, the list is partly covered by the map; is there a way to force these to use 2 or 3 lines (as appropriate)....or suppose I could use the drop-down instead (when sorted for multiple values)?
4.  The search box for the map does not work, nor does clicking on the map to add the grid ref to the box on the left.  Is this because it does not yet have the settings you have offered to copy in (above)?

Thanks!

4

Re: Green Lanes survey - sectioned transect form

Hi Sam
1. I've tidied some Javascript so it now loads in IE7 (it was working in IE8+)..
2. This form is not developed with the same level of flexibilty (yet) as the dynamic form, so you can't do this. Of course the PHP code is there if you want to take a look.
3. I've tweaked a template so the flow problem does not occur. To get the checkboxes working, you need to go to the edit attributes link on the warehouse for the survey (select Lookup Lists > Surveys then find your survey and click edit attributes). Then select to view the location attributes as if you were designing the blocks. Then, click edit for the ones you need to change and change the default control type to checkbox_group. Finally, don't forget to clear the Indicia cache on the Drupal site or the changes will take a while to appear.
4. Probably related to point 1 - they are working now for me.

Another point - you will need an attribute called No. of sections (type integer) to capture the number of sections the lane is being divided up into.

I've created you a grid listing your sites at http://www.nbis.org.uk/my-green-lanes, though this will need a bit of testing as I can't be sure it is linked up properly without inputting some data.

John van Breda
Biodiverse IT

5

Re: Green Lanes survey - sectioned transect form

Thanks for the changes you have made.  I made changes suggested and cleared cache, the form seems to look better and has the multiple options, the map appears in IE7 and look fine and selects grid refs now.
Despite setting up the no of sections attribute....and being able to add the number in the form, the sections options do not appear and one cannot draw the route of the sections, like in your butterfly transect example you sent me.  Is this due to the my green lanes form not linking properly to this form?  If I do try http://www.nbis.org.uk/GreenLanesForm, I get this message: 'Information saved to the database' on a 'page not found' (http://www.nbis.org.uk/site-details?table=location&id=751#your-route).

Any thoughts?

Thanks!

6

Re: Green Lanes survey - sectioned transect form

Hi Sam
I've set both the page to redirect to after save as well as the sites list page path to "my-green-lanes" and it now works. I'd recommend making many of your controls not required though, especially the checkboxes as you may not want to select any of the options.
After save you see the section editor, which does not yet save anything because you need to go to the warehouse setup attributes page for the survey, then configure each of the location attributes so that they only apply when the location type is a transect (i.e. the lane, not a section). Otherwise the required attributes prevent the data from saving.

John van Breda
Biodiverse IT

7

Re: Green Lanes survey - sectioned transect form

Thanks John.

So I have made the set-ups or changes as you have detailed.

I have gone through the process of someone adding a green lane survey dataset in and, although I realise some further help text is needed at the top, I am not exactly sure if the data has been submitted.  I filled in the site details > then pressed save>  it then redirected to the my-green-lanes form as you said and I could draw the sections in the 'your route' tab > I then went to the section details tab, as there is no save on the your route tab > I then clicked save in this section, which just lists the sections drawn > once clicked it does say data is saved.
Where in the database can I see the records, as I have looked under occurrences and samples (which I know is species orientated) and the usual 'Survey details' report I use I cannot see the data for this?

Thanks

Sam

8

Re: Green Lanes survey - sectioned transect form

if you get to the "Your Route" tab then the main data for the site has been saved. Next step is to draw each of the sections on the map - they are auto saved as you create them. Once saved, you go to the section details tab to edit section specific attributes, but as all your attributes are specific to the transect (corresponding to the whole lane) you don't see any.
You could either add attributes relevant to the section (not required), or we'll need to disable the third tab as it is irrelevant.

John van Breda
Biodiverse IT

9

Re: Green Lanes survey - sectioned transect form

thanks john,

we shall have a think here about that, and whether we want attributes for the sections or just the lane itself.  If we don't want attributes for the section, and to be honest even if we do, is there anyway of putting a redirect at the end or a message (information saved to database or record submitted etc), so that people feel they have actually completed the submission........I'm aware there is a message before you get to 'Your route'......so I guess I could put some help text to explain.

Also not sure I got an answer about how I view the data in the warehouse, once submitted......and indeed in drupal (is this simply a verification form again?) - thanks

Also on a separate subject:
I have just updated Drupal to a minor security release, and now my add images upload buttons on my iforms do not work on the grid mode only, eg.:http://www.nbis.org.uk/AllSpeciesForm?newSample=&gridmode=
I have tried unticking java script optimisation and clearing caches, but this does not make any difference - I did this as I know this had caused some problems a while back.
Any thoughts?  I sure it is something obvious.

Cheers

Sam

10

Re: Green Lanes survey - sectioned transect form

Inherent skills: penance, Inner Focus, Pain Suppression, Power Word: wall, Greater Heal, Prayer of Healing, to disperse the (defensive)

swtor credits
swtor credits kaufen

Most of [url=http://www.woweuvip.fr]wow gold[/url] players will take this ways to buy [url=http://www.woweuvip.fr]wow po[/url].

11

Re: Green Lanes survey - sectioned transect form

When you save the details of the lane (before your details) there is a message as you note. I guess your confusion is that when you draw each transect section, the section is immediately saved to the database so you don't have to submit anything. It's less confusing probably when there are attributes because you would go to the third tab to update attribute values then save them so at least you have the benefit of feeling like you clicked a submit button. I guess a solution would be to briefly display a notice that the section has been saved to the database each time you create a new section.
The my-green-lanes page I set up is your best way of viewing the data because it gives you an edit link with full details available of all sections in one place. It is setup to filter the report for the current logged in user, so if you want to make a copy of this page for admin use you can remove the filter "attr_location_cms_user_id={user_id}" from the preset parameter values then use Drupal permissions to make it only accessible to admin.

I'm afraid I'm stuck on why you are getting JS errors since the Drupal update. I've upgraded my local copy to Drupal 6.25 and it works fine, plus I've upgraded your plupload component to 1.5.2 (the latest) and yours still does not work so there must be some JS on your site clashing with the uploader.

John van Breda
Biodiverse IT

12

Re: Green Lanes survey - sectioned transect form

When you get chance to look my response below:

I think the solution to the knowing you have submitted a record bit, is for me to remove the 'Specific features or characteristics of interest' block from site details bit and put this under the section details bit.  If I can work out how to do that.  Would that block need to go in my-green-lanes form or do I need to revise the warehouse survey attributes to say put this in the sample or occurrence lists?

I will fiddle around with the report to get it to download to csv the useful bits of info, as it currently is occurrences and species, which we do not have....and maybe great an admin version as you say.

Related to this, currently when looking at the record you input I can view the record, but a get a red drupal message saying the following:
warning: Invalid argument supplied for foreach() in /websites/123reg/LinuxPackage99/nb/is/_o/nbis.org.uk/public_html/sites/all/modules/iform/client_helpers/prebuilt_forms/sectioned_transects_edit_transect.php on line 400.

Also, and more importantly: When logged in – filling the green lanes form in is fine.  When not logged in it errors and will not save the drawn sections, but will save the site info, see email with screen shot.  I had obviously not tried to use the form logged out before.

Thanks for looking at the JS error.

13

Re: Green Lanes survey - sectioned transect form

Hi Sam
As I recall, to move the attributes from the Site Details to Section details tab, you need to go to the Setup attributes link for the survey then edit each attribute to set them up so they appear for Location Type=Transect Section. Don't forget to flush the Indicia cache or the change won't be immediate.

I'm not seeing the JS error e.g on the link http://www.nbis.org.uk/GreenLanesForm?id=781.

The error you are getting when not logged in is because by default the AJAX code for saving records to the database is not enabled unless you are logged into Drupal. It is perfectly possible to allow non-logged in users to do this (by granting the permission "IForm AJAX Proxy passthrough" to "anonymous user" on the drupal permissions page) but I'm not sure I would recommend allowing unauthenticated users to save data in this way as it might be a security hole.

Cheers

John van Breda
Biodiverse IT