Import Country list in combo

Jan 26, 2015 at 2:43 PM
Hi is possible to have the DNN country list in a combobox of one of my field?
thanks
Fabio
Jan 26, 2015 at 10:01 PM
Edited Jan 26, 2015 at 10:06 PM
Hi

You could do this with the new webapi feature and create a custom input form and build up a combobox with the result of a sql query
SELECT *
  FROM [Lists] where ListName='Country'
See here for another code example I posted using a modified version of the feedback webapi example https://sexycontent.codeplex.com/discussions/576488

Just replace the sql query with the one for the country list and update the text and value for the combobox with the correct columnnames from the table

Armand
2DNN
Your friendly non official 2sxc support
Coordinator
Jan 27, 2015 at 6:28 AM
I agree w/nokiko, that's the best way to go for now.

We're working on something, but it's still some months off for now.
Jan 27, 2015 at 9:41 AM
Hi tanks a lot
is this possible also in the admin interface?
Can my user insert a new store and connect it to a country with a dropdown?
thanks
Fabio
Coordinator
Jan 28, 2015 at 7:35 AM
@rmartin1977
Your question is much too compact. What store? Which admin interface?
Jan 28, 2015 at 10:04 AM
To insert the Country combo box in the manager area, Where my client insert a new store and select country?
Thanks
Fabio
Jan 28, 2015 at 10:16 AM
Best way to do it in the stndard admin interface would be to create a new cotnent item country, fill it with all the countries you need and then in in teh store contet type also add a countr ( type entity ) and link that to your just created content item country
Jan 28, 2015 at 3:02 PM
Ok, how can i import Country list form?
SELECT *
  FROM [Lists] where ListName='Country'
is there a way from import data?
Fabio
Coordinator
Jan 29, 2015 at 2:12 PM
Ok, here goes

There is a hidden functionality for data import export. It's hidden because there is no documentation or video yet, but we use it for various projects so it should be stable.

How to get there? Well, open a normal admin-dialog, go to export or something and then copy the URL of the IFrame in the dialog. It will be something like this:

http://2sxc.org/en/Learn/ctl/import/mid/681/AppId/2?popUp=true

Then, replace the word Import with "dataexport" or "dataimport", so it will be a bit like

http://2sxc.org/en/Learn/ctl/dataexport/mid/681/AppId/2?popUp=true
or
http://2sxc.org/en/Learn/ctl/dataimport/mid/681/AppId/2?popUp=true

It should be very self-explanatory, but since it's not officially released, there are things in it which aren't 100% ready. For example, avoid importing/exporting any of the content-types starting with a "|" symbol, these should actually be hidden.

Good luck :)