Set default value of select (in editor edit mode) using value from GET variable

Set default value of select (in editor edit mode) using value from GET variable

crush123crush123 Posts: 417Questions: 126Answers: 18

i want the select list of my editor instance to default to a value from a url variable (in edit mode), if it has no value set already

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    As in, you want to make an Ajax request to determine what the default should be? Are you using dependent() to set the options by any chance? If so, then you could also set the value using those options.

    If not, you would need to use initEdit to make the Ajax request and get the value, then use val() to set the value.

    Allan

This discussion has been closed.