Hi all.

One question: Any code to include this module as a widget option in cck textfield type content?

Thanks.

CommentFileSizeAuthor
#8 slider_textfield_cck.patch6.99 KBstella

Comments

skilip’s picture

Hi elesku,

There's no CCK field widget for the slider textfield yet. I haven't puzzled my way into developing CCK fields, but am planning to.

escuriola’s picture

Ok. I think that CCK will be a very useful application of your plugin. I hope you develop it soon. Thanks a lot.

carlitus’s picture

+1

niklp’s picture

I don't get this at all. This module says it adds a slider for a textfield, but why would you assign it against a textfield if it only holds integer values??

Surely we should be using it with an integer field (rendered as a text input) and using the validation functions already offered by CCK??

I have no idea why this is implemented against a textfield, and there are really not enough instructions to get it working, in my opinion.

skilip’s picture

@NikLP:

The motivation for using a textfield is that still some users have javascript disabled. With javascript disabled, the user can still use the input field. The validation functionality of CCK isn't used while the form field isn't built for CCK yet. I'm planning to though. Any suggestion for making the documentation better is more than welcome. I'm aware of my 'no so very good english once in a while'.

niklp’s picture

Uhhh.. yes, but the exact same is true of an integer field?!

If you use an integer field, you basically get a text field, but you can enforce most of the settings via CCK itself! That is, required, minimum, maximum, number of values etc.

So this doesn't provide any clues at all as to why you have used a text field, *especially* since the slider only works with integers in the first place! :)

skilip’s picture

Again, I haven't done any CCK development yet, but I'm getting more and more motivated to do so (thanks to this discussion).

stella’s picture

Category: support » feature
Status: Active » Needs review
StatusFileSize
new6.99 KB

Try this attached patch.

skilip’s picture

Stella,

Thanks a bunch for your patch. I needed some time to figure out what you've done to add CCK functionality (documentation is rather poor for CCK2). There was a problem with saving the updated values. After changing the value to 48, only 4 was stored and saving 38 would actually save 3, and so on... This was caused by a little mistake in the update process in javascript. The hierarchy of the CCK form elements was a little confusing to me.

Nonetheless, I've figured it out and ported a BETA release. Thanks again!

skilip’s picture

Version: 6.x-2.1 » 6.x-3.0-beta1
skilip’s picture

Status: Needs review » Postponed (maintainer needs more info)
niklp’s picture

Title: CCK » CCK integer field jquery slider

This still doesn't work for me. I don't see the two jquery ui files loaded when I look at the page source. Perhaps there's something wrong with the way JQP is set up? It's hard to say, because the docs are quite limited in some respects.

I would suggest also that there be a check for the existence of the JQP module in this module - this is quite simple. It seems to me that the jqp_add_js functions aren't working. Everything else appears fine, the settings are available in the page source etc, but the slider doesn't work.

skilip’s picture

I totally agree with you. In fact I already created a patch for this #349091: Clear cache if a file doesn't exist. Regretfully I haven't had any response on this yet.

escuriola’s picture

Thanks very much for developing the cck widget option.

Only for improve this tool, this is the tool I use for my sliders:

http://www.filamentgroup.com/lab/progressive_enhancement_convert_select_...

I think It could be a good guide to continue improve this plugin.

Thanks again.

skilip’s picture

Awesome!! I'll definitely take this into the next release! In fact I was already discussing this feature here: #353211: Add a configuration option for defining the labels