1

Re: MNHNL Dynamic Form for Drupal

Hi

I have been trying out this Drupal form which dynamically creates a survey form to match the warehouse configuration for that survey. You can use the Lookup Lists > Surveys > Set Up Attributes option on the warehouse to establish the order and grouping of attributes. Very cool.

I was having a problem with the fields not appearing as I expected on my Drupal form. I traced this to the fact that, under the Custom Attributes > Sample Attributes warehouse menu, my attributes were checked both as non-survey specific as well as being survey specific. The upshot of this was that the warehouse thought I wanted these attributes twice and, at the Drupal end, the non-survey specific version over-wrote the survey specific version, eliminating the details of grouping.

To work around this problem, I simply un-ticked the non-survey specific checkbox. This post relates to version 0.4.0

Jim Bacon.

2

Re: MNHNL Dynamic Form for Drupal

Hi,
sounds like a great solution for setting up a custom data entry form! Unfortunately we are getting error messages again...
When we try to follow the link Lookup Lists > Surveys > Set Up Attributes we get the following:

Please check the Kohana documentation for information about the following error.
   system/core/Kohana.php [1162]:
The requested view, Attribute_by_survey/index, could not be found
Stack Trace
    * system/libraries/View.php [84]:
      Kohana::find_file( views, Attribute_by_survey/index, 1 )
    * system/libraries/View.php [50]:
      View_Core->set_filename( Attribute_by_survey/index )
    * application/controllers/attribute_by_survey.php [56]:
      View_Core->__construct( Attribute_by_survey/index )
    *
      Attribute_By_Survey_Controller->index( 2 )
    * system/core/Kohana.php [291]:
      ReflectionMethod->invokeArgs( Attribute_By_Survey_Controller Object
      (
          [template] => View Object
              (
                  [kohana_filename:protected] => /home/webmapping1002/public_html/indicia/application/views/templates/template.php
                  [kohana_filetype:protected] => .php
                  [kohana_local_data:protected] => Array
                      (
                          [system] => Array
                              (
                                  [version] => 0.4.0
                                ...
                                ...

This happens for any survey and we have no idea what to do about this.
Any suggestions would be greatly appreciated!
Gaby

3

Re: MNHNL Dynamic Form for Drupal

...problem solved!
seems that in the code a folder name with a capital A was expected.  It works now after we changed the indicia/application/views/attribute_by_survey folder to Attribute_by_survey. Maybe this specific problem only arises on Linux servers as they are case sensitive?
cheers,
gaby

4

Re: MNHNL Dynamic Form for Drupal

Thanks for sharing that. I'm running IIS on Windows Server 2003 and hadn't experienced a problem. That should be an easy one to fix for the next release.
Jim Bacon

5

Re: MNHNL Dynamic Form for Drupal

I've just fixed this in the code repository. FYI, application/controllers/attribute_by_survey.php, line 56 in the warehouse should read:

$this->template->content=new View('attribute_by_survey/index');

Thanks for the info.

John van Breda
Biodiverse IT