editor options, add item to recordset (not placeholder)

editor options, add item to recordset (not placeholder)

crush123crush123 Posts: 417Questions: 126Answers: 18

I have an options list in my editor which is populated from ajax/json

i want to add an extra label/value pair to my list so that a row being edited can have this value de-selected by the user

the placeholder works fine for create, but does not appear on my list when in edit mode

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Try also using the placeholderValue option of the select field type. It could be set to null, or an empty string or whatever you need. That option provides the ability to be able to select the placeholder option.

    Allan

  • crush123crush123 Posts: 417Questions: 126Answers: 18

    hmm, i tried that.

    on records which had no pre selected value, this was the value displayed, but it was not available to select.

    i will try and get a demo uploaded asap

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Oops - sorry, I forgot the placeholderDisabled option:

    Typically you won't wish to let an end user select the placeholder value, but on occasion this behaviour can be useful (for example selecting an empty value to indicate no join when used with a joined table). This option can be used to allow user selection of the placeholder by setting its value to false.

    That will fix it.

    Allan

  • crush123crush123 Posts: 417Questions: 126Answers: 18

    it does !

    perfect.

    Many thanks

This discussion has been closed.