The selector field does not give back values

glueckskind - June 14, 2007 - 14:11
Project:Fixed Data Dropdown
Version:5.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:critical
Assigned:markfoodyburton
Status:closed
Description

Hi,
I created and uploaded following csv-testfile by creating a new content type.

a,alpha
b,bravo
c,charlie
d,delta
e,echo

Until this point everthing went well. While trying to create a new node, the autocomplete field works fine, but the selector field does not give me the value back and remains empty. I checked the database and everthing seems to be allright.

fdd_key | fdd_value
a | alpha
b | bravo
c | charlie
d | delta
e | echo

What am I doing wrong?

#1

markfoodyburton - June 14, 2007 - 14:59

not 100% sure I understand your question, but I think you are saying, when you re-edit the form, the selector field is not where you left it.

This is because it's only saving the value of the text field (i.e what you have selected)
What you need to do is save both....

Use "multiple values" to do that (it's an option on the field setup page)

BTW, if your database is this small, use a taxonomy search instead :-)

#2

glueckskind - June 14, 2007 - 15:35

Thanks for your quick response.

I allready checked "multiple values".

I thought this module to be a selector for my postal codes. I want the user to type a postal code and the module should return the city like this 12345 -> City. The problem is, that I can enter the postalcode - which is found by the autoselect field - but I don´t receive a city. The dropdown menu remains empty, so I can´t choose a city, it changes from to an empty field.

>BTW, if your database is this small, use a taxonomy search instead
This little example is only for explaining my problem ;-)

#3

markfoodyburton - June 14, 2007 - 15:45

OK, so that should work - it's what I'm using it for.

So, I wonder if you have the javascript stuff working.....
For instance, it relies on the jquery stuff -- but that should be working (in drupal 5.0)....

Could you check the error -logs from your browser and see if something obvious is going wrong. (on my browser it's under tools/error console)

#4

glueckskind - June 14, 2007 - 18:49

Javascript is working. I tried every Browser installed on my system (IE 5-7, Firefox, Opera, Konqueror, Safari) but all the same. The jquery module is also updated.

The error console of Firefox gives me 2 errors on the site:

Error in parsing value for property 'display'. Declaration dropped.
http://localhost/drupal/modules/system/defaults.css

and

Unknown property 'filter'. Declaration dropped.
http://localhost/drupal/sites/all/modules/cck/content.css

I use Drupal 5.1 on apache 2.2.3 with php 5.2.0

#5

markfoodyburton - June 14, 2007 - 19:29

Looks like we have the same machine set up :-)

But I'm not sure what to suggest now.... I'd like to debug this together if you have time.
we need to use IM or some such though..

in principle, http://drupal.org/user/114447/contact should allow you to contact me directly, I think, if not, I'll hang round the chatroom tonight...

#6

Miteto - June 15, 2007 - 13:19

Same problem - apache 2.0.54, php 4.40, mysql -4.1.14

#7

markfoodyburton - June 15, 2007 - 13:25
Priority:normal» critical
Assigned to:Anonymous» markfoodyburton
Status:active» reviewed & tested by the community

FOUND IT :-)

(Or at least I think I have)

I think you are not using "friendly URL's" - and my module assumed they were on (which is bad :-( )

So - the fix is simple, in the FixedDataDropdown.js file, you need to make the following change
Add a ?q= such that it looks like this:
$('.fixedDataDropdown_value').filter('[@id*='+fieldid+']').removeOption(/./).ajaxAddOption("?q=/fixedDataDropdown/autocomplete/"+fieldid+"/"+selection);

I've tested this locally and it seems to work - but then, so did the previous version :-)

So - I have checked this into the CVS - you can check it out from there if you dont want to make the edit.

Once somebody tells me it's now working, I'll check it in

#8

markfoodyburton - June 15, 2007 - 13:27

sorry, it is checked in, I mean, I'll make a new release

#9

glueckskind - June 17, 2007 - 11:24

Thanks for your work. Now the module works realy great.

#10

markfoodyburton - June 20, 2007 - 14:08
Status:reviewed & tested by the community» fixed

latest version fixes this bug

#11

Anonymous - July 4, 2007 - 14:19
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.