My data does not get stored when using the auto complete widget...

Comments

drupalnesia’s picture

I am using PHP 5.3.8 with Autocomplete Widgets 6.x-1.3 works fine, all data stored.
Can you try 6.x-1.3?

Also I need more information according to your options selection, like: use value list or existing data, etc. Again please double check to make sure your data is not store correctly.

drupalnesia’s picture

Category: bug » task
Michsk’s picture

Ok, here is how i'm using this.

Node type A has a autocomplete field and a automatic node title which is set trough [field_activiteit_autocomplete-raw]. So it is set with the value that is set in the autocomplete. The autocomplete field is using the Autocomplete for allowed values list. Here's some more value from the autocomplete field:
Automatisch aanvullende overeenkomst:
Contains
Case sensitive:
Off
Allowed values, PHP code:

$matches = array();
	$count=0;
		$result = db_query_range("SELECT title FROM {node} n WHERE n.type ='activiteit'", $string, 0, 10);
		while ($data = db_fetch_object($result)) {
			$matches[$count] = check_plain($data->title);
			$key=$matches[$count];
			$results[$matches[$count]] = $key;
			$count++;
		}
return $results;

Then trough the http://drupal.org/project/node_widget module i automatically let users create an 'activiteit' node when they are adding a 'dagboek' node. (Diary and in every Diary you can add an activitie you did that day).

Michsk’s picture

Ok, it seems the value is saved, but when editing the node the node title from the autocomplete fields is not shown.

This could mean that it has to do with node widget or automatic node title or this module.

kemitix’s picture

I'm seeing the same behaviour as in #4 with my autocomplete_widget. I don't have the node_widget module installed though.

kemitix’s picture

Investigating further it only manifests when I use PHP Code for allowed values.

kemitix’s picture

Okay, I found why this was affecting me:

When I used PHP Code, the existing value wasn't in the array returned.

The array was a filtered list that to prevent values from being used on more than one node. So when I went into edit the node, the current value was being excluded and the field was blanked as a result.

Unfortunately it means I need to look at another way of implementing this for myself.