Search

i installed this extension and got the country list in the backend, i want to populate the same in the front end too how to have a select box with country populated in the front end what need to be done ?

Three ways:

  • use the Section Schemas extension to create a data source that reflects all of your field's default values in page XML
  • create a Dynamic XML Data Source with the URL pointing to the same XML file that populates your field, and attach to your page
  • in your XSLT use the document(...) function to read in XML from a given URL or local path

create a Dynamic XML Data Source with the URL pointing to the same XML file that populates your field, and attach to your page

  • i used 2nd way to populate the countrylist but am not able to insert the values into the backend section, i have created an event for a form in which i have populated this country list , but the country is not getting inserted into the section , how to insert the country value into the backend?

What is the name of your dropdown field (the XML select box field)? Make sure you have correctly named it in your HTML form. Probably something like:

fields[country]
<country-list status="fresh" creation="2011-05-09T10:23:07+00:00">
<countries>
        <country abbr="AF">Afghanistan</country>
        <country abbr="AX">Aland Islands</country>
        <country abbr="AL">Albania</country>
        <country abbr="DZ">Algeria</country>
        <country abbr="AS">American Samoa</country>
        <country abbr="AD">Andorra</country>
        <country abbr="AO">Angola</country>
        <country abbr="AI">Anguilla</country>
        <country abbr="A1">Anonymous Proxy</country>
        <country abbr="AQ">Antarctica</country>

this is my xml output and my field is country , fields[country], am not able to insert , i tested the post value it is right but not getting inserted

Make sure you're sending the country abbreviation in fields[country], so use UK instead of United Kingdom.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details