What should be done with the jQuery form plugin

taite11 - November 21, 2008 - 02:12
Project:Autosave
Version:6.x-1.1
Component:Documentation
Category:support request
Priority:minor
Assigned:Unassigned
Status:closed
Description

So, it says it requires "jQuery form plugin" and provides a link to it. Then what should be done with jQuery form plugin?

#1

anarchman - November 26, 2008 - 19:06
Priority:normal» minor

I believe all you need to do is link to the js file in your page.tpl.php file of your theme. e.g., <script type="text/javascript" src="/sites/all/themes/zen/scripts/jquery.form.js"></script> Probably you should put that line directly below wherever you have the

<?php
print $scripts
?>
line.

#2

liquidcms - November 26, 2008 - 19:14

jquery.form.js is no longer required by this module (versions newer than 5.x-3.0)

jquery.field.js is required but it is included with the module and attached to your code by the module.

#3

liquidcms - November 26, 2008 - 19:14
Status:active» closed

#4

liquidcms - November 26, 2008 - 19:22

and, just for added info/qeustions:

to original poster; did you try it without plugin and module didn't work?

to #1 just for your reference, that is never the right way to add JS. if you have a module the module will always add whatever JS is required by using a drupal_add_js() call in the module code.

if for some reason there was JS code that for rel control or licensing reasons couldn't be included with the module, then the best approach would be to do a file_exists check before doing the drupal_add_js - and then, if it was missing, output a drupal_set_message call letting user know file is missing - actually better to do that in the .install so that the site admin can see the message when they install the module.

#5

taite11 - November 26, 2008 - 20:58

Thanks liquidcms. I didn't try it... I just wanted to have it installed right and didn't notice that the jquery form plugin requirement is not for this version.

 
 

Drupal is a registered trademark of Dries Buytaert.