3

Using smart admin theme in SmartMessageBox input type is select but how to add option with value?

$.SmartMessageBox({
        title: "AddLearningObject",
        content: "ObjectTypeText"",
        buttons: "["Cancel"] ["Next"]",
        input: "select",
        options: "[Video][Assessment][Link]"
    }, function (ButtonPress, Value) {

    }   })

Options added by [Video][Assessment][Link], but how to add a value to them?

Anup Sawanand
  • 31
  • 1
  • 6

1 Answers1

1

You pass the value by data attribute...

example

$.SmartMessageBox({
    title: "AddLearningObject",
    content: "ObjectTypeText"",
    buttons: "["Cancel"] ["Next"]",
    input: "select",
    options: [$(this).data('value')] "[Video][Assessment][Link]"
}, function (ButtonPress, Value) {

}   })
CertainPerformance
  • 356,069
  • 52
  • 309
  • 320
Austin
  • 9
  • 1
  • 3