n-deep nesting (was: getting this error when I enter a csv file?)
mrgoltra - June 2, 2007 - 18:56
| Project: | Fixed Data Dropdown |
| Version: | 5.x-1.x-dev |
| Component: | Documentation |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
* Illegal value for Country List Drop Down.
* The default value is invalid.
is there a specific format for a csv file? Is there a compiled list somewhere I can test?
Thank you,
Mark

#1
Hi Mark,
I dont fully understand the question, but I'll try and explain what the thing does
There is a "regular expression" field on the setup page for the fixeddatadropdown. At the moment, the default is set to a quite complex looking string...
Actually, all that regular expression does is say, if it's 2 coma separated fields, use it.
Whats worse, the default regular expression isn't very robust, so
"hello, how are you", 2
Would be parsed as
"hello and how are you",2
Which is probably not what you want.
But, as a starter it's ok I think - if somebody comes up with a better one, so be it :-)
So, if you dont want to edit the regular expression at all, then sort out your data so it looks like
KEY1, VALUE1
KEY2, VALUE2
KEY3, VALUE3
KEY2, VALUE4
KEY1, VALUE5
...
etc
I hope this helps. If you do want to edit the regular expression - it's VERY easy to do, and you should not be scared, just read up on regular expressions and then you can make what changes you need. For instance, my test data has 4 columns, 2 of which I dont care about, and the columns are separated with ";" not ","....
Cheers
Mark.
#2
Hi Mark,
I dont fully understand the question, but I'll try and explain what the thing does
There is a "regular expression" field on the setup page for the fixeddatadropdown. At the moment, the default is set to a quite complex looking string...
Actually, all that regular expression does is say, if it's 2 coma separated fields, use it.
Whats worse, the default regular expression isn't very robust, so
"hello, how are you", 2
Would be parsed as
"hello and how are you",2
Which is probably not what you want.
But, as a starter it's ok I think - if somebody comes up with a better one, so be it :-)
So, if you dont want to edit the regular expression at all, then sort out your data so it looks like
KEY1, VALUE1
KEY2, VALUE2
KEY3, VALUE3
KEY2, VALUE4
KEY1, VALUE5
...
etc
I hope this helps. If you do want to edit the regular expression - it's VERY easy to do, and you should not be scared, just read up on regular expressions and then you can make what changes you need. For instance, my test data has 4 columns, 2 of which I dont care about, and the columns are separated with ";" not ","....
Cheers
Mark.
#3
Hi Mark,
Thank you for the reply. What I am trying to accomplish is to have a cck fields (country) when selected will populate the corresponding the state/region to that country field then populate the city field as a selection, etc. I don't know if this is a way to go about it, I tried the other module but I can't even enable the module, so I am looking for a way to implement this on my content type page.
Thank you ,
Mark
#4
This module should work just the way you want it to :-)
(It's almost exactly what I'm using it for :-) )
so, you need to get a list of all the countries and states/regions
something like
uk, Hartfordshire
uk, Hampshire
uk, TooMuchMoneyShire
uk, SlumShire
France, Dordogne
France, Sounds Nice
France, Paris
etc etc
Then you need to pull that (HUGE) list in using the interface as we previously discussed....
(I'm sorry there s a delay in getting back to you, I'm traveling, but I will try to be responsive)
#5
Thanks for the follow up, I will try to find something.
One more question, if you don't mind. ( I am new to all of this(everything), sorry)
#6
sorry about the block quote below yours actual quote.
#7
ok, sorry, we do have a problem :-(
I was thinking you ONLY wanted country, region
If you want n-deep nesting, this module COULD be adapted to do that, but I haven't done it yet.
(I've changed this into a feature request)
There may be somebody out there that would like to address this, but I dont need it personally, so I am unlikely to do the job unless somebody wants to persuade me... I dont think it would take more than a few days, but right now, I cant afford to spend those days....
#8
Hi Mark,
Thank you again, not a problem for me. Actually I am very grateful for the help, enjoy your trip.
Thank you,
Mark
#9
+1 for this feature.