1

We are using the x-editable jQuery/bootstrap plugin.

Something we cannot work out how to do is custom displays, Essentially we display the users location as city/COUNTRY e.g. Napier/NEW ZEALAND

Now what we want is when the user clicks on the editable containing this data we need a popover that has a text input for the city and a select for the country. We then need to send this off to the server as two different keys aka

{
    city: 'Napier',
    country: 'nz'
}

Well, at least that would be ideal, we could get away with sending value: 'Napier|nz', I could work this part out myself, the thing I don't get is how to display the two different fields in the popover?

Here is a jsFiddle playground: http://jsfiddle.net/KYvAC/

Hailwood
  • 89,623
  • 107
  • 270
  • 423
  • 1
    Check out the [demo page](http://vitalets.github.io/x-editable/demo.html) for x-editable, they have an example for an address with multiple fields. The JS for that is located [here](http://vitalets.github.io/x-editable/assets/x-editable/inputs-ext/address/address.js) maybe that can give you an idea of how to implement yours – omma2289 Jul 15 '13 at 06:04
  • Cheer's that's got me going in the right step, next question is... http://stackoverflow.com/questions/17653901/x-editable-custom-field-type-not-respecting-overridden-defaults – Hailwood Jul 15 '13 at 12:08

0 Answers0