Hi guys, I've wrote a module that uses jQueryUI widgets to create ready to use form elements. It provides normal and collapsible horizontal tabs , normal and collapsible accordions, range (2 value) slider, single value slider, range slider with fixed minimum value, range slider with fixed maximum value and buttonsets.

I wanted to publish it as an independent project but then timplunkett in IRC told me about this project, and it seems that my module can be placed here (maybe as a sub-module because it depends on jquery ui).

Please review the code and see if it's OK to put this in elements module :)

P.S. This is the module itself and not a patch, if you decided that it can be placed be here, I'll be happy to provide a patch!

CommentFileSizeAuthor
#1 elements.patch10.7 KBfarhadhf
jq_form_elements.tar_.gz20.65 KBfarhadhf
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

farhadhf’s picture

FileSize
10.7 KB

Attached the patch.

webankit’s picture

+1

andypost’s picture

There's 4 slider modules see #1416822: Duplicate modules

farhadhf’s picture

This code contains 4 types of jQuery slider (2 of them are not provided by other modules), But it also contains normal and collapsible jQuery tabs, normal and collapsible accordions, buttons and buttonset.
So maybe you can use portions of the code that you are interested in?

andypost’s picture

@farhadhf I just point about duplication of efforts and suggest to join forces
there's another reply #1237668-12: sliderfield
so I recommend to continue discussion in #1416822: Duplicate modules

farhadhf’s picture

Ok! Thank you! :)

jrowny’s picture

So the only thing that I think sliderfield does that this doesn't is provide a widget which can be used by fields. Does elements plan to include widgets? If so, should I start patching them on here? Or should I open a new thread for that?

Glenmoore’s picture

How do we use this module? I've installed it in the normal way and I have jquery update but cannot see any sort of interface?
Btw Does it take cck values as inputs to max and Min values?

farhadhf’s picture

It does not provide any interface, This is an API module, It provides a few form elements that can be used by other modules.

Glenmoore’s picture

Oh right, ok thank you.

klonos’s picture

Perhaps if the modules "pretty-name" was Elements API it would make it clear(er) from first look ;)

Anonymous’s picture

+1

jlyon’s picture

Got an error when trying to apply #1 to both the 7.x-1.x and 1034690-horizontal-tabs branches:

git apply -v elements_2.patch 
elements_2.patch:117: trailing whitespace.
  
elements_2.patch:120: trailing whitespace.
    
elements_2.patch:125: trailing whitespace.
    
elements_2.patch:128: trailing whitespace.
    
elements_2.patch:139: trailing whitespace.
        // if it's range slider with a fixed minimum 
Checking patch elements.module...
Hunk #1 succeeded at 53 (offset 2 lines).
Hunk #2 succeeded at 124 (offset 3 lines).
error: while searching for:
  }
  return $element;
}

error: patch failed: elements.module:154
error: elements.module: patch does not apply
Checking patch elements.theme.inc...

I am going to be working on adding webform support to the module in the tarball from the original issue post.

qasimzee’s picture

In my opinion, this kind of module is a must that provides all jQuery controls with Form API.

amocsy’s picture

Priority: Normal » Major

I think the key here is that it provides controls for Form API, and thus it's for module developers, most "duplicates" are for site builders, huge difference!

BTW is Elements module dead? No activity on the dev branch since so long.

Dave Reid’s picture

Nope, not dead.

subhojit777’s picture

I applied the patch and re installed the module. I have a form element like this:

  $form['population'] = array(
    '#type' => 'jq_slider',
    '#start' => 0,
    '#end' => 300000,
    '#step' => 5000,
    '#value_prefix' => '$',
  );

But it is not working.

subhojit777’s picture

Issue summary: View changes

added ps!