# Importing separate data into a single checkbox field?

Not sure what the best title for this question was, so hope it makes sense!

I am importing some data from an XML feed into EE via the add on Datagrab.

Its mostly straight forward data, so its pretty simple, but I would like to know if its possible to change the way some of it is imported.

Each entry in the XML feed has a range of "Options"

For example...

...
<option1>1</option1>
<option2>0</option2>
<option3>1</option3>
...


Whereby the value of "1" means yes and "0" means no.

I would like to import these values into a single checkbox field so it would be something like...

Option One [√]
Option Two [ ]
Option Three [√]


Does anyone know if this is possible?

It would save me quite a few custom fields if it is, and will make outputting the data/creating search forms a lot easier!

Thanks.

• Is the range fixed or variable? – erwinheiser Apr 17 '13 at 22:27
• It'll be fixed. Same number of options for each entry, choice of either 1 or 0. – shorn Apr 17 '13 at 22:41

<input type="checkbox" {if field_name == "1"}checked="checked"{/if} />

• Yep, I had though about that. Front end wise I could just output a list of options that match the value of 1 like so: {if field_name == "1"}<li>Field One</li>{/if} I Was just hoping that it could be imported into a single field for ease. I was also thinking ahead to my search form. I will want users to be able to select the options via my search form (low search) so that it returns entries that have that value matched, and I'm not sure how I can do that via this way. – shorn Apr 18 '13 at 10:40