Options for Select Field Type - Default Drop-Down List Value

Options for Select Field Type - Default Drop-Down List Value

rboudwinrboudwin Posts: 28Questions: 6Answers: 1

I would like to highlight/select the option in the drop-down list to match the value already returned in the column. I have not been successful in getting def to work. Should it be a placeholder?

fields: [
             {
                 label: "RATINGCODE",
                 name: "RATINGCODE",
                 type: "select",
                 options: [
                    <cfoutput query="codes">
                    { label: "#codes.ratingcode#", value: "#codes.ratingcodeid#"},
                    </cfoutput>
                 ]
             }

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @rboudwin ,

    I don't quite follow, sorry. In this example here, if a field is a select dropdown, see the Location column, when it is edited the current value is always highlighted by default. I don't think I'm understanding your issue.

    Cheers,

    Colin

  • rboudwinrboudwin Posts: 28Questions: 6Answers: 1

    I believe what I had missed is the ability to have editFields. Once I used editField, it appeared to be working correctly. Thank you!

    { data: "sites.name", editField: "users.site" }
    

    Thank you!

This discussion has been closed.