1

Re: Drupal form library and wizard form updates

Just a heads up – I have just checked in quite a few changes to the data entry helper stuff as well as the Drupal iForm module. The changes relate to the following:
1)    Ability to use the tabbed interface support to do a “wizard” interface, with hidden tab strip and next/previous buttons. See data_entry_helper::enable_tabs and data_entry_helper::wizard_buttons. Also I updated http://code.google.com/p/indicia/wiki/TutorialTabs.
2)    Ability to attach validation to the controls “client side” using the jQuery validation plugin, so you can do an initial validation before they leave a page without postback. See data_entry_helper::enable_validation. Also see the tutorial http://code.google.com/p/indicia/wiki/T … Validation.
3)    Drupal “prebuilt forms” can now have custom css files, automatically linked in if they are in the prebuilt_forms/css folder with the same name as the form php file.
4)    Drupal “prebuilt forms” can now have custom language files, automatically linked in if they are in the prebuilt_forms/lang folder with the same name as the form php file but with en.php as the extension (replacing en with other languages as required).

If you look in the prebuilt forms library using Subversion you will see a form starting with mnhnl in the name, this has examples of all of this.

John van Breda
Biodiverse IT

2 (edited by Alan Hale 18-01-2010 09:45:47)

Re: Drupal form library and wizard form updates

Hi John

I'm not clear on how to get to the "prebuilt forms library using Subversion" to get these latest versions.

I tried over the weekend installing the Aug 31 version of the Drupal iForm linked from the Downloads page, using my own warehouse server installation. It clearly connects since the species drop-down list is populated OK, but no map displays. On the other hand If I build a client page from scratch (following the  tutorial)  on the same domain but outside of Drupal  I get a working map (but no species list!).

I also notice that if I select "Use tabbed interface" in the Iform edit page, I don't get a tabbed interface - just 3 hyperlinks to items on the same single page.

Also, the link to the validation tutorial in your posting seems to be broken.

I'm using Drupal 6.14 by the way - about to update to 6.15.

Cheers

Alan

Alan Hale
Aberystwyth

3

Re: Drupal form library and wizard form updates

Hi Alan

The link in the previous post had been auto-generated by the forum software, unfortunately it included the full stop at the end of the sentence as part of the link. I've specified the link manually now so it should be OK.

The post was intended as an indicator of things to come in the next downloadable version, plus a note to anyone actually developing prebuilt forms so we don't duplicate effort. But, if you did want to download the development code, you need to use something called a Subversion client to extract the code from the Google repository. Please bear in mind that this is intended for developers, or people who want to try the very latest code for some reason, as there is a fair chance the code you download won't work at all since it has not been through any testing. In fact at the moment we are in the middle of quite a few updates and improvements so it may be wise to wait a week or two anyway.

The SVN Client I use is called TortoiseSVN (http://tortoisesvn.net/downloads) but there are quite a few others. Once this is installed, the path to the latest version of the client_helpers folder is http://indicia.googlecode.com/svn/core/trunk/client_helpers. For example, with TortoiseSVN installed right click on a local folder in which you want to place the code, then select SVN Checkout from the menu. Enter this path as the URL, then click the OK button. This should download the latest code, and you can update it by right clicking the folder and selecting SVN Update.

Back to your original problems, it sounds to me like you are getting a JavaScript error on the page if the maps and the tabs won't load. Do you have FireBug installed on FireFox now and if so do you see an error reported in the status bar? Clicking on the error should give more details.

Best Wishes

John

John van Breda
Biodiverse IT

4

Re: Drupal form library and wizard form updates

Hi John

Many thanks for taking the trouble to explain about Subversion.  I'm interested in how this works -  (but I'll use with caution!).

Ah yes, Firebug (sorry, I find it hard to break my Chrome habit). It does report an error:

jQuery("#map").indiciaMapPanel is not a function


jQuery('#map').indiciaMapPanel({"indicia...e"],"0":"initialFeatureWkt","1":null});\n


Cheers

Alan

Alan Hale
Aberystwyth

5

Re: Drupal form library and wizard form updates

Hi Alan,

Sorry for the slow response - I've been away a couple of days and still catching up with myself. If there is no other error, then we need to check that your page is finding all the JavaScript files, in particular Indicia's mapping library. In FireFox, right click on the page and view source. Then, search for the link to jquery.indiciaMapPanel.js and click the link to follow it. Does it give you a file not found error, or does it load the JavaScript file OK? If it is not found then can you see anything wrong with the path? Mine is http://localhost/indicia/media/js/jquery.indiciaMapPanel.js.

Best Wishes

John

John van Breda
Biodiverse IT

6

Re: Drupal form library and wizard form updates

Hi John

No problem and thanks for getting back.

The link to  jquery.indiciaMapPanel.js  appears to be good.

Looking at Firebug output again there appears to be a problem with this line (slightly edited here):

jQuery('#map').indiciaMapPanel({"indiciaSvc":"http:\/\/www.wales-lichens.org.uk\/indicia\/","indiciaGeoSvc":"http:\/\/xx.xxx.xxx.xxx:8080\/geoserver\/","divId":"map","class":"","width":600,"height":470,"geoPlanetApiKey":"xxx","presetLayers":["multimap_landranger","google_physical","google_satellite"],"0":"initialFeatureWkt","1":null});

Cheers

Alan

Alan Hale
Aberystwyth

7

Re: Drupal form library and wizard form updates

Hi Alan

I've copied your code into my own page and it works fine here. Any chance you can email me the whole page code?

Thanks

John van Breda
Biodiverse IT

8

Re: Drupal form library and wizard form updates

Hi John

I've just emailed to you via your Forum email link.

Would it help to have the URL? (Access to the site requires an account - I can set one up for you and mail you details.

Cheers


Alan

Alan Hale
Aberystwyth

9

Re: Drupal form library and wizard form updates

Got it - it's because you are running in Drupal with the jQuery update module installed. What is happening is the Indicia code is linking in the jQuery library, then the map declares a plugin. Then, Drupal's jQuery update module is pulling in jQuery for a second time, which replaces jQuery with a new version that has no map plugin. So when it gets to the map initialisation code, the plugin has disappeared!

Fortunately, this is all fixed in the latest version of the Drupal module so I will upload this in the next day or two. Indicia now uses the jQuery module in Drupal rather than its own so there is no clash.

Best Wishes

John van Breda
Biodiverse IT

10

Re: Drupal form library and wizard form updates

Ah - I see! Thanks John for taking the time and trouble to track down the problem.

I look forward to trying out the new version.

All the best

Alan

Alan Hale
Aberystwyth