Search

My apologies if this has already been asked or if it is a stupid question! Can I create a select box with the values 0,1,2,3 but when the user selects the drop down in the control panel they see an appropriate label, i.e. 0 - available, 1 - sold?

I am bringing in external xml with xml importer which uses numbers for the values but would like to make it more user friendly for admin if they need to edit the entry by labelling each option.

thanks in advance

Got it working with the field: xml select box extension, just if anyone else comes across the issue.

thanks

Interesting approach, could you post how it's all configured?

Sure no problem, I don't know if its the correct way to do it, but it seems to be working in my test environment so far...but I have a lot more testing to do.

I'm working on importing property information from an external xml file. One of the fields is for property type. The values held in the xml file run through from 0 to 114. There is a separate document that details what each number represents, i.e. 0 - Not Specified, 1 - Terraced, 2 - End of Terrace etc.

I am using the xml importer to bring in the values from the xml, which worked but it brought the number into the section i.e. '1'. Ideally I wanted to bring the number in and also a label value in this case 'Terrace'. I couldn't see how to do this with a select box so I installed the xml select box extension.

I created an external xml file containing the property types along with their ids;

<?xml version="1.0" encoding="UTF-8"?>

Not SpecifiedTerracedEnd of TerraceSemi-Detached

I then added the xml select box field to my section (see attachment)

Saved the section and imported the property type; PROPERTY_TYPE/text() with the xml importer.

Like I said much more testing needs to be done. I'm fairly new to all of this though so if you see any pitfalls please let me know!!

Thanks

Attachments:
xml-select-box.jpg

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